My underground base in one of my older files has a room for growing trees using bonemeal, and I just found out about this quirk, as this is my first time running the game in a couple months. This is why I have a storage hall I can dig to expand.
This has been a thing since 1.15.2 (January 2020).
Oak, birch, or mangrove trees grown from saplings that are within 2 blocks (including diagonally) of a flower on the same y-level have a 5% chance to grow with a bee nest containing 1–3 bees. This holds true in any biome in any dimension, and for any flower including wither roses and flowering azaleas.
I think this already in the game long ago.
Oddly, I’m guessing having a flower within two blocks may not be a requirement anymore, as the nearest other botanical things are jack-o-lanterns, and some netherwort that’s probably out of the range mentioned in your quote.
Its just a lower chance if its not near flowers
It’s been a thing since one of 1.15’s revisions I can’t remember, it lets me get bees on skyblock maps which is neat- and thus candles, easy pre-passive-mob-farm food, and in the endgame piston airships.
I was really confused till I saw the community name.
Not sure if it’s a Java thing, bedrock thing, or both, but planting a flower next to a tree also greatly increases the chances of the tree spawning with a beehive.