Bees pollinate as a side effect of their travels, which are (from the bee’s PoV), intended to collect the energy-rich pollen so the hive can make food.
I assume it was trying to collect as much pollen as possible via its hairy body.
This is why those same flowers turn into yummy fruit, so other (like us) will eat them and drop or excrete the seeds elsewhere.