Why Andorra become a part of Spain?

Andorra is not part of Spain. It is an independent sovereign state, located in the Pyrenees mountains between France and Spain.
Copyright Wanderlust World © https://www.ynyoo.com