There is no code 'reading's your statements' - all of those transactions are coming from the bank's core banking systems anyway. If you are concerned about some rather obvious targeted marketing then you'd be really worried if you knew what sorts of analysis many banks are really doing across all of the data which they can capture/collect about you - banking transactions, social media data, web-clicks on your online banking or their website etc.
Although that's nothing compared to the gambling firms (both online and 'bricks & mortar') who do very complex / real-time analysis to determine what your personal 'loss threshold' is, and then offer incentives such as free bets or free drinks (in gaming 'establishments' only of course) to make sure you place just one more bet, or that you come back again next time.