With thanks for all the help, and apologies for causing confusion, I now have a more sensible view of how buildings are aligned in OSM, at least for the British Isles. The main puzzle is solved, and of course it was all my own fault. I had realised that I had to re-project the data to get sensible estimates of way lengths, but I hadn't realised that I needed to do the same to get to the orientation. Of course it is blindingly obvious with hindsight, but at the time....
Now that is fixed, the distribution looks more sensible to me.
It is still showing spikes on the four main points of the compass, and a smaller cluster rotated about 30% anti-clockwise. Whether that is how buildings are actually oriented is another question altogether. I haven't managed to extract the source for most of these outlines, but about 3% of them say they are traced from OS Open Data, and about 1.5% from Bing. All show similar characteristics.
Now a similar analysis is grinding through for roads, and I will post the results when I get them, in case anyone is still interested.