Yes, of course it's legal. It's a part of doing business in Thailand. The ones who cry foul the loudest must be to broke to afford the valuable services of an agent. I do my own extensions but I'm seriously considering an agent for the next one.
In all seriousness having drinking in the bars become part of your life is an easy trap for many. I have a kid here, but many times wonder how my days would go if I didn't.
If the exchange rate makes any difference to your holiday plans then it would be prudent to wait until a time when you're in a better financial situation.
It's nothing to be ashamed of.