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).
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.
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.
I was really confused till I saw the community name.