Unless one is setup as a nonprofit, in the US, there is very little difference between recieving 5000 from a donation link and recieving 5000 as a payment on an invoice. It is all taxed the same.
Some projects might not be setup for either, but it sounded to me like the above poster was dealing with some one who was willing to accept it as a donation, and it would likely have been trivial to send an invoice for 5000.
Not all open source devs are from the USA and in a lot of place outside it say the EU it can be quite the hassle. If you do it wrong it can very well be more than 5k worth of effort to fix it. When the taxman comes out 2 years later with a fine saying you didn't do X or Y.
In those countries the taxman will come out anyway because it will say that it was not a donation and you are trying to avoid paying taxes. It would be better to speak with an accountant beforehand in either case
it not about avoiding paying them (you will anyway unless you're in very narrow class of orgs) its about being in the wrong legal structure and getting stuck in administrative hell because you don't fit in their tidy little classification boxes.
Tax isn't the only issue. The parent poster already mentioned another one: employment contracts generally have some provisions against competing with your employer that require you to get clearance for other jobs. Another is a payment is never without strings attached and those strings might not be something you want to deal with unless you can live off of the project.
Well, I don't know about practices globally, but again, in the US, it is rare for a programmer to have such an employment contract. And if you did, wven volunteering on an Open Source project that competes with your employer would likely be in violation, and it would not make any difference between a "donation" and an "invoice".