Did I
need to see Peter doing the Saturday Night Fever stuff? Was it something I really, really wanted to see in Spider-Man 3? No, but I don't hate it like so many others do. Obviously it wasn't meant to be taken seriously.
Also, the joke worked for me because the movie took time to show so many women looking at him in disgust/horror. Like what others have said, Peter wouldn't know what being cool was if it bit him in the butt (based on how popular people have treated him in the past), so of course he'd act like that.
And, not gonna lie, I legit laugh every time Peter puts his feet on JJJ's desk. JJJ's expression/response to it is flawless.