Back in the early nineties I was in the hospital and didn't have any PJs. I had pants and a few t-shirts but the shirts were dirty so I was walking down the hall with no shirt on. Now, granted back then I had a job throwing and lifting heavy objects (not weight lifting but apparently the same result) and while I never thought of being married, apparently had a nice physical appearance, not the muscle bound beach type, but clearly an upside down triangle I guess you'd call it. Needless to say, more than one nurse looked at me, blushed and moved on except for one, the head nurse as I recall, told me to either put a shirt on or go back to my room. Honestly, there had been no intent to excite anyone but it happens. This was a guy having an effect on some women.
Women going around with no tops on would certainly "excite" guys so I think the reason is for safety more than anything else.
Reminds me one time of going to the beach with some friends. I think it was up by Malibu and there was a nude beach but to get to it you had to climb over some rocks. I'm not a nudist nor am I interested in being a nudist but as we made it up the rocks there were a number of "no-clothes" women passing us by. When we finally ended up on the beach there were a few guys who looked initially like they were fishing in the surf but became very obvious that the poles were not fishing poles.