I was waiting for the legal experts on this forum to respond, but since I don't see any more detailed responses yet...
In the U.S.... Yeah, it costs $325 to apply... but unlike, say, a domain registration, there is a lot more to getting a TM than just paying a fee. You have to document genuine use of the mark in commerce. There are multiple hoops... including a period of time in which others can challenge your claim. If you wind up having to get a lawyer involved (which can be hard to avoid), it will cost a lot more than $325.
Hopefully some of the lawyer members of this forum will respond and ammend or correct or confirm the above. We should all appreciate the lawyers who do post on this forum for free for the public good. They give their profession a good name.