There are many different possible aspects. Many donors profit off the donation and that in turn, like you said, lowers the amount of taxes to be used. In the US if it is a president you like and you like how they and the states allocate money (money for construction road development, etc, a donation can in a sense prevent that construction.
It is not exact, but a good example that covers multiple avenues is as follows:
If made millions in income and I donate 1 million dollars (which that 1 million would have been taxed at 22%) to my own charity that I run (or any charity), I just avoided paying $220,000 to the government to fix roads, pay for military, etc. I can then also get a rebate on that, getting a small amount of money back from the government (now the government owes me).
In terms of allocation of money, many charities use donations to pay for salaries. Some take 50%, some may only take 1% of each donation for salary purposes. If the charity is a road building charity and they use a higher number (50%), now instead of 1 million going to pay contractors for road building, only $500,000 goes to paying contractors to build roads. And instead of paying to build roads in the areas that badly need road repair, they may only choose to pay for roads repairs in rich areas, but that would be a whole different discussion going any further than that.
Now if I was malicious like many high earning donors are, my money can be donated to my own charity. If it is my own charity, I can then take a salary off of that, or pay my brother a high wage to do paperwork so he can profit as well.
While this is of course not the situation with every donor or charity, this explains some issues and how it takes away money that the government could have used.
Two good videos that talk a little more about this and that likely have better info are: