At some studios, their price includes an engineer, but often a good engineer charges extra. Once the song is recorded, a separate mixing engineer will take the raw tracks and make a finished mix. Then a mastering engineer will polish them further for different markets including radio or AAC. And if you need or want a producer, arranger, cowriter, or session player, you have to pay them for their time. All the while you need to eat and pay rent as an artist or band.
$10k is an average budget for a short album, and consider to break even an artist must sell 13,000 songs if independent through iTunes, more if they split revenue with a label. How many artists have less than 13,000 fans? This is why many record deals today include touring revenue as part of the contract, because they know they can't sell enough downloads to recoup the cost.
> many artists do not actually need professional mastering
Almost everything sold commercially has been mastered, the only stuff I have heard unmastered is on Soundcloud/Youtube for a reason. Having a skilled third party polish a track is essential.
> why not make your music free
Why is this acceptable for a musician but not for a film director, actor, programmer, or any other career professional? Should all films now be made DIY with volunteer actors and we'll just have hobbyist special effects and post added? What are these hobbyists supposed to do to pay rent and eat?
Music is an expensive business, and digital downloading hasn't changed that. That's why it's frustrating to hear people feel entitled to free music, even if there's not much we can do to change it.