You got a lot to learn about boners.
Men get boners when they see something they want to put their dick on/in but it goes a lot deeper than that. Men can get boners because of warm weather, because their dick is stuck to their leg, because their pants are too tight, because their underwear is too loose, because something just vaguely brushed past their dick, because their thinking about how fucking terrible it would be to get a boner at that exact moment, and most common of all, for no fucking reason. They just happen.