I believe they occur when a tree is too close to another tree or body of water. I think trees need to be spaced at least one block from one another in order to grow. Plus, trees cannot be directly next to water as they will not grow either.
Also from what I learned, trees will not grow if they are next directly next to the sandy area in the beach. There has to be a one block space between the grass and the sand in order for it to grow.
Also edited to add that trees will not grow either if they are too close to buildings, there has to be a one block space between!
But regarding the main topic, this has happened to me when I didn't know better and I thought trees would be able to grow directly next to bodies of water. I initially had this plan of creating a lake that had trees surrounding it, and that entire idea had to be scrapped, and I just used azalea bushes to create that gap, and then plant the trees next to them.