Why don’t free apps on the app store have a “Thank You” button where people can say thank you or send you a tip so freeware developers don’t starve to death?
Youtube has this feature on some but not all of their channels.
Most freeware developers are not starving to death - they have well paid jobs, and make apps as a hobby in their spare time.
The complexities of receiving payment (e.g. hiring an accountant so you don't violate some unknown tax law) are often not worth it. Time spent figuring all of that out is time the developer would rather spend making their free app better.
I like to think of it the same as music. Some people get paid to pay music, and some people play music for fun.
They do, the Onion Browser have three IAP that are simply for tipping the dev. It's simply more hassle to ensure the app doesn't run afoul of the AppStore strict IAP rulings, compared to just putting a link to the developer site/blog where they might share a donation link.
It's very much up to the developer to implement the In-App Purchase (IAP). Some apps do have ways to make IAPs that give developer the tip, and the user doesn't get any extra features.
Some apps are free and make money by advertisements or selling user data.
As for thank you, I'd guess a good review would improve their visibility on the App Store, so that's what I've been doing.
Another reason not yet mentioned is taxes. Depending on the jurisdiction(s) you're operating in, you may need to file tax returns on even ridiculously small amounts of income from such tips, and it's probably not worth the time and effort putting up with that for the little you've left afterwards.
E.g. were I to make an app and put in such a feature, I'd have to pay 50% or so of everything that comes in in taxes to my government, after already paying 30% to Apple. I'd also have to register as a business with the chamber of commerce which carries recurring fees and costs more time. Then there's the corporate bank account I'd need to separate that money from my private funds as it'd now be company money. I'd need to make several thousand Euros a year just to break even on the tips as a result, which isn't something most apps would generate in purely voluntary donations.