It's genetics. The spanish horses are expected to have long manes and tails, and it is considered part of their beauty.
Banoota, I must just point out that those fotos of the long haired white andalusian you took from my website Andalusians for You in Spain
I am the photographer, and there are clear copyright notices on the pages which state that the pictures may not be reproduced without permission.
I am not going to hassle over this, as I am assuming you acted in ignorance, but I do pursue any unauthorised use of the photos, especially on commercial or moneymaking sites.