Most Helpful Guy
Maybe he is socially inept and doesn't realize that what he did was not appropriate. OR maybe he is an exhibitionist and he got a sexual thrill from doing that. OR maybe he is trying to "push the envelope" to see how far he can go with behavior that has some sexual connotations.
Most Helpful Girl
He’s probably testing how interested you are in him on a sexual level.