You dont get it do you?
When the US invited Turkiye to the F-35 program,did that mean that Turkiye had the technology to contribute in any hichtech way to the program?
Allies invite each other to join future military programs,it will reduce costs,further cooperation between allies,send a message,help each other out etc,its a natural thing.
Btw,both Japan and Korea have their own programs,Turkiye wanted to join the Korean program but the Koreans didnt want to share the tech so Turkiye didnt join.
USA has not shared F-35 secrets even with the tier partners in the F-35 program
A European standard 5th gen fighter in Pakistani hands will cause excess sweating in a few countries who like to maintain a tech advantage be it in South Asia or even the Middle East...after reading some of the comments above.
try buying a 4th generation fighter with your own funds