I got a small stipend as a check for a focus group thing, $125. I don't want to deal with the taxes, etc. Can I just endorse the check, hand it to, say, the food bank, and pretend I never saw that money? Will the food bank accept it? Will the IRS not care and somehow know the money passed through my hands?
There are several aspects to your question.
First, this $125 that you received is considered taxable income. On your tax form, it would go on the "Other income" line, which was Schedule 1, Line 8 on the 2020 Form 1040. The income was yours, and just giving it to someone else (even a charity) does not relieve you of paying the appropriate tax. If you did report the income, and then donated the same amount to charity, it would be deductible if you itemize your deductions.
So if your question is about the letter of the law, then endorsing the check over to a charity does not accomplish the goal of not being required to declare the income on your tax return.
Having said that, because the amount we are talking about is less than $600, the company that gave you this check is not required to file a Form 1099 for this payment. If you don't receive a 1099 for this payment, then the IRS would only find out about the payment if you declare it on your tax return (which you are legally required to do) or if you are audited. So to answer the question "Will the IRS not care?", they will care if they find out about it and you didn't declare it, and it won't matter if you signed it over to someone else or not.
I have already established that signing over the check to a charity does not really accomplish any of your goals over cashing the check yourself and giving the money to the charity. However, your question of whether or not the charity will accept a check that has been endorsed and signed over to them is an interesting one. Signing over a check to a third-party is something that used to be more common than it is now. As check fraud has risen, banks have become more wary when it comes to honoring unusual checks. It is certainly legal to sign over a check to a third-party; this is done by signing the back, then below your signature writing "Pay to the order of XYZ Food Bank." However, in order for it to be any good to the charity, their bank needs to accept it, and they don't have any way of verifying that you are the one that endorsed the check. As a result, many banks won't honor checks like this anymore. Even if the charity trusts you and accepts the check, their bank might not. Signing over a check to a third party these days is really something you do only as a last resort if you can't find a better way to pay someone, and it doesn't always work anymore.
The fatal flaw in your reasoning is that IRS has rules about when charitable deductions are deductible for you. Further, IRS has rules about which charities are tax-deductible and consumers have lots and lots of misunderstandings about that, especially with everyone from Youtubers to "cam girls" calling things 'donations' that are NOT charitable. You are effectively trying to short-circuit that and grab a charitable deduction you may not be entitled to.
However there's a simple answer. Mail the check back to the issuer with a short letter asking them to re-issue the cheque to your charity of choice. Include an addressed, stamped envelope addressed to the charity, and any paper donation form the charity might use (e.g. download it off their web site and fill out the parts you can).
They won't mind doing that.
This resolves the question of whether the charity is in fact tax-deductible, by making it "not your problem". They weren't expecting to take a tax deduction, but they can pursue it if they really want to.