When a nation uses income taxes to provide shelters and resources for the homeless, they are essentially exacting a mandatory donation. This is the hallmark of a good society: it cares for its weakest members as a matter of standard procedure. There are many reasons why a person may find themselves without a home, and as long as the system is equitably applied, it is just.
A mandatory donation can not exist. Donations are by definition voluntary. If you force someone to donate something then the donation is not voluntary at that point, which means that it is no longer a donation. "Mandatory donation" sounds a lot like a terribly wordy and dishonest way to say "tax".