I realize many people getting PPLs have no career aspirations. Still, if you want the operating privilege, you should come across as someone who at least approaches aviation with a professional attitude. I have no desire to become a lawyer, but that doesn't mean I'll wear a T-shirt to court.
If I were to go to court, I would be there in my nicest business suit and heels. There's no way I'd show up to fly my Archer for my instrument checkride in the same outfit. Entirely different circumstances.
A "professional attitude" encompasses a great deal more than the clothes on one's back. I'm not saying it's okay to look like a slob for your checkrides. I do not think it is! But one does not have to wear a tie to have a professional attitude. Dress neatly, be clean, wear socks that match but be more hung up on how you carry yourself, the attitude you display to the DE in your tone of voice & your manners. And know your stuff, no matter what you wear if you don't know your stuff you're not going to pass!