This is an excellent point. In my opinion, such laws are a good idea. Most of the time, policy decisions should not require IRS data. (Or other personal data.)
But to get around such laws, the government asks citizens to provide that data a second time (in the census). And sometimes it's asked yet again on other forms. This seems to defeat the purpose of those laws.
I can see that federal disaster aid might need to know if some area needs more or less aid, depending on the wealth of the area receiving aid. If aid is given to individuals, the have a need to know the individuals' income.
When there is a reasonable need to know, I would prefer the government use the much more accurate IRS data, rather than ask for people's income multiple times. The laws preventing merging federal datasets could be rethought, given what is now known about preserving privacy mathematically. I would like to see specific exemptions made, with the provided data properly anonymized to preserve privacy while serving the legitimate purpose for which the data was requested. The use of such data should require a request to congress for it.