I am not aware of any diagnostic test that requires your apple ID and password. Definitely nothing official apple, and nothing I have ever seen from unofficial channels either. I'm not sure what they're getting at. Your Apple ID might be necessary for records or something. But there is no reason any technician should ever ask for this password as far as I'm concerned.
Even when I was an authorized tech and we needed to turn off find my device from any device before repair. I had the client do it all themselves. At most I would ask to find it in settings, toggle switch off and give it back to the owner to enter credentials I don't ever want that information to be honest. I didn't even want PINs most of the time when I did repairs because I didn't need access to any of that for Apple's diagnostics.
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
3