It's not just the first amendment, but a three-step failure: (1) government can't restrict people's speech (first amendment); (2) for-profit corporations are "people"; (3) money is speech. That gave us Citizens United[1], and as long as politicians are a bit more subtle than Duke Cunningham[2], it's allowed.
[1] https://en.wikipedia.org/wiki/Citizens_United_v._FEC
[2] https://en.wikipedia.org/wiki/Duke_Cunningham#/media/File:Du...