The Templars were simply the most financially successful of several gangs of ennobled hoodlums who profitted out of the Crusades, invested wisely to increase their wealth, operated with a ruthlessness that would have shocked a New Jersey Mafioso, and were finally done in by the Papacy.
Their purpose was self-enrichment