Depending on the type of tree, it may have to do with the root structure. Many trees have root profiles below the surface that mimic the branch profile above ground. If the roots do not have room to grow toward the neighboring tree, than the branches will not. It may also have to do with sun exposure, since the bulk of the tree will grow toward the best sun exposure.
Two tree planted together compete for sunlight among other things. Each tree tries to fight for its own and takes the branches up to get more sunlight, besides they are close together and there is no space to expand but there is space to go up.