I’m no constitutional lawyer but wouldn’t that be a violation of the 4th amendment whereas (and I don’t exactly know why either) it’s been deemed constitutional for the government to buy data collected by third parties?
Yup. As to the "why" part, the whole thing operates under the legal assumption that if you already shared your data with somebody else (e.g. your bank) you have no reasonable expectation of privacy.
Essentially, the "secure in their persons, houses, papers, and effects" part of 4A is interpreted literally. Since that third party has your data, you're still secure in your papers and effects, but the bank doesn't have 4A protection.
That made some sense when information meant either you had a piece of paper, or you had given it to somebody else. But ever since information is cheaply copied and distributed, it really doesn't work so well.
(This is why I believe any literalist interpretation of the constitution is bullshit. It just doesn't translate well over a 200 year distance)
It's currently a somewhat debated legal concept - Sotomayor had an opinion that amounted to "maybe we should rethink that" a while ago, and there have been a few cases saying "nope". But nothing's reached SCOTUS so far.
(If you want to find out more, "third party doctrine" is the keyword. Or buy a constitutional lawyer a beer, it's fun :)
The bank still has this right and uses it to its advantage. In this case, it seems the bank deemed the value of cooperating with government more than customers’ privacy.