Basically,
tęte-bęches occur for two reasons. They can be accidental, like this one from Cochin

where the printers used to take the printing plate apart after every printing, and accidentally inserted one of the clichés (the individual dies) upside down when they put the sheet back together again. They fairly quickly fixed this mistake up, so these examples of
tęte-bęches aren't at all common.
Sometimes, though, it was just a matter of convenience. The printers for Charkhari often used very large sheets of paper to print on: large enough to hold two impressions of the printing plate. After the first strike of the plate, the printers just turned the sheet around, and applied the plate again. This gave big sheets with two impressions of the plate,
tęte-bęche.

These aren't particularly rare - the pairs are only worth a little more than two single stamps.
And of course, some modern stamp designers do it deliberately, to catch the collector's eye, and make something striking and a bit different. (You might be able to guess from the sort of stamps
I collect that I don't think much of that

)