Most republics borrow most of their core concepts from monarchies that preceded them. In the early (modern) republics like the US & France, Presidents have a lot of power, especially military power.
Many later Republics (eg Ireland) inherited from monarchist systems with more of a ceremonial role for the king, and presidents tend to have more of a ceremonial role too.
Anyway, to various extents and with lots of caveats... Presidents have the power to pardon in a lot of democratic countries. In Ireland, for example, the power is constitutionally with the President, but in practice the power is with the government/parliament.
Whatever the details, pardons (and clemencies) are a necessary device. Even courts need check valves and this is a way of checking courts without harming the court as an institution. Yes, it is open to abuse, but on balance I do think it's necessary.
I agree that this sounds like an ugly politicisation... but everything about the Assange case is highly politicised. The content of the offense publishing politically damaging information about parties, politicians, defense and intelligence bodies. There have been tactical indictments in multiple countries. Secretive proceedings. Etc.
This was never a case where blind justice reigns pristine. It's an inevitably political shitshow.
For analogy, think of US impeachment. It's an obviously political, and whether or not the President has enough friends in Congress matters more than evidence. It's a whole lot better than nothing though. If you want to see what not having anything looks like, you can look at the shitshow going on in Israel currently.
Sometimes you need a way around standard rules. Standard rules exist for a reason, and bypasses aren't without a cost... but I do think they're necessary.