rs's simple answer is correct, but I'll extrapolate it a bit
It has to do how the TV cycle works in Japan, most shows only get one or two seasons of episodes (~13 or ~26) which is usually far too short for shounen anime to complete a story(FMA Brotherhood took ~60 eps, D.Greyman had 104 and STILL didn't finish, etc.) But later, if sales of DVDs and Blu-rays were good they could get sequel series, if not, then not, and it's far less likely for a 26 episoder to have great sales because those DVDs/Blu-rays don't come in series, they come out with 2-3 episodes so it starts to add up fast.
As for why some have awkward stopping places, it has to do with original material, to use your example of Tenjho Tenge, the anime was in 2004, but the manga went on until 2010, so there was no ending to speak of, so at the end of it's 24 episodes it got an awkward finish and then sales were poor so no sequel happened.