The biggest reason is that the social standard for "going out to a club or bar" dress skews towards sexy. It might not even be a conscious effort to look sexy for men. Once I went to a club in jeans and a "cute" t-shirt because I didn’t have time to change, and I definitely felt awkward and out-of-place. Most people dress in certain ways because that’s the social norm.
Many other potential reasons:
Their girl friends are dressing in a certain way, and they want to fit in.
Other women dress this way for various reasons (some might want to get picked up, some are trying to look hot for dates / guys they are with), so they feel social pressure to dress in similar ways. There might also be a tendency to be competitive with other women.
They want to show off some new outfit to other girls.
They want to get preferential treatment (sometimes comes from looking good).
Bars and (especially) clubs are crowded and hot. If you wear too much, you'll feel icky and uncomfortable.
They just want to feel pretty / hot.
There is a sort of self-satisfaction that comes from looking hot yet being unattainable.
They might not be trying to dress "sexy." Maybe you just think they look sexy.
Clubs are about being seen. Consider that you can dance to music and drink in your own home. So women are competing with other women for attention. At this moment in history, wearing sexy and revealing clothing is a reliable way for women to gain attention, and it's sanctioned by some aspects of women's culture as a way of being powerful, too.
Women want to feel good. One way we feel good is to dress in a manner that makes us feel like we look good. If we dress in a way that makes us feel hot, we're going to have a better night.
This might be a bold statement but here goes anyway: Not everything women do is for the benefit of men.
Dressing sexy does not mean that it is an open invitation for all comers. Like the fisherman who baits the hook not knowing if a fish or two will bite and if he will be able to successfully reel it in. It doesn't mean that the intent is to have all the fish bite.
Most women are discriminating and do not seek nor desire the attention of all men, but are looking for the guy who they find attractive.
Men don't realize that the cat calls, aggression, sound effects, uninvited groping, crude comments and group behaviors is not desired, quite the contrary. Any woman who has had to walk by a construction site will tell you that it is debasing.
Some women, sure, want to be beaten over the head and dragged home caveman style.
Some women really like the attention but don't want it to go beyond that.
Some women like to look pretty.
However, defaulting your assumption to #1 is dangerous because women who are #3 will hate you for treating them like that whereas women who are #1 or #2 will probably only be a little miffed if you treat them as if they were #3. So start there and judge accordingly.