Stop defoliating so much. that can cause excess stretch, too.
competition for light can cause excess stretch.
insufficient light can cause excess stretch.
As far as hanging distance -- is node spacing proper? if too lanky, you have some evidence to blame the light. Looks like it could have used a bit more light, but, when each branch has significant competition for light, they also stretch out even if the light is not the problem. Is there a lot of overlapping leaves between the branches? easier to see in real life rather than a picture from the side.
Removing leaves at the top can cause the plant to try to reach for more light... Stop removing leaves for 'bro-science' reasons. Read 'to defoliate or not...' on cocoforcannabis.com for a more eloquent explanation as to why you should not defoliate for the bro-science reasons often given.
It's hard to say exactly why somethign happened when there are so many moving/changing variables. Assess your situations and apply the known concepts for a best guess. Stick to ~3 colas per sq ft. Based on size of area that plant is filling, you can probably shorten your vege... a ton of wasted vertical growth you don't use. you want to minimize how much you have to lollipop, not maximize it. that may help too... longer vege = bigger stretch potential.
Not much you do now will change the outcome, but maybe splay the plant out slightly -- without snapping a branch. Try to spread it out along the length of the light as best you can... some graden wire pulling the outer branches further away from center etc etc...
if you have to defoliate due to congestions, don't grow that congestion next time. For most phenos, you only need ~3 colas per sq ft to maximize yield. (in ambient co2, figure 50-70g per sq ft is your ceiling for average to above average yielding phenos.) Phenos known for tiny buds may want more branches per sq ft, but again, you don't want a congested canopy, either.
i find 3 colas per sq ft gives me good-sized nugs that aren't too large i have to worry about bud rot and disease. It allows great light penetration but still captures all the light (no gaps). I have to do very little pruning or extra maintenance in regard to axial growth or leaves. Everything you cut off the plant is wasted time and resources growing it. Some of it is inevitable to avoid larf, but we can minimize it greatly by improving our methods systematically from grow to grow.
If you regularly approach or exceed 50g/sq ft using seeds, you are doing fine in regard to training and any pruning employed. If you use clones of known heavy yielders, you'll blast by that figure by 40% or more. CO2 might add another 25-30% on top of that? conflicting info on the exact amount it adds. As you try new things, this helps you set reasonable goals to strive for. Qulaity is just genetics... no magic product to put lipstick on a pig in that regard.