I found a donation machine in a shop.

What does it do apart from take my money, if anything? I noticed it seems to break after a few coins.
I found a donation machine in a shop.

What does it do apart from take my money, if anything? I noticed it seems to break after a few coins.
Edmund explains it here, basically it slowly upgrades the store, sort of leveling it up to have more items, etc.
Donation machine can unlock certain items and upgrade your shop, allowing it to sell more items.
List of unlockable stuff:
In the Afterbirth DLC, you can also find the Greed Machine, which can unlock items and achievements. It appears after Ultra Greed Fight
List of unlocks from the Greed Machine:
In addition to upgrading the shop, you can also use a bomb on it to get some coins out of the donated money pool. Especially useful if you only need a few coins to buy that shop item.

It seems that using a bomb "destroys" some coins
I noticed that the number of coins donated remains from run to run, and when it reached 10 I got the secret "The Blue Map has Appeared in the Basement!" Hopefully this helps.