Do anime usually lose money? It seems as though a lot of anime go through a production cycle where they put out a series that seems fairly popular, but ends long before the manga's storyline does.  Obviously, a big reason for making anime is to get people to buy the original manga, but if the anime series itself were turning a profit it's tough to imagine (from my American viewpoint, anyway) that the producers would abandon it, when it could easily continue (given its proven popularity, voice actors lined up, storyline set, etc.)

Is there an overarching reason?  Do many anime not turn a profit?
Anime is much bigger in Japan. There are lots of mangas that were given a shot at anime adaptation, but they didn't get a following and eventually got pulled. In my opinion, the manga has to be popular in Japan first before the network heads start to export the anime officially. 

There are other reasons aside from profit. Take Gintama for example; I can't be sure if they were pulled off air because of profit (which I doubt) or because the network wasn't happy with the show's direction.

So, yes, the big reason why they get pulled off air is because the anime didn't make enough profit. It's a competitive market.