The German President is a ceremonial head of state.
Under Weimar, he had strong executive powers and was popularly elected.
Executive power is now invested in the Federal Chancellor, the German equivalent of Prime Minister in other countries.
Most parliamentary systems that abolished the monarchy replaced the monarch with the (usually popularly-elected) president, who performs similar ceremonial functions to the monarch, e.g. convene/dissolve the parliament, sign bills into law et al. I often get the impression that it was/is in mockery of the USA, just like most dictators like to assume the title of “president” too.