This is Article 3 of the Lisbon Treaty establishing the EU
The Union's aim is to promote peace, its values and the well-being of its peoples.
2. The Union shall offer its citizens an area of freedom, security and justice without internal frontiers, in which the free movement of persons is ensured in conjunction with appropriate measures with respect to external border controls, asylum, immigration and the prevention and combating of crime.
3. The Union shall establish an internal market. It shall work for the sustainable development of Europe based on balanced economic growth and price stability, a highly competitive social market economy, aiming at full employment and social progress, and a high level of protection and improvement of the quality of the environment. It shall promote scientific and technological advance.
It shall combat social exclusion and discrimination, and shall promote social justice and protection, equality between women and men, solidarity between generations and protection of the rights of the child.
It shall promote economic, social and territorial cohesion, and solidarity among Member States.
It shall respect its rich cultural and linguistic diversity, and shall ensure that Europe's cultural heritage is safeguarded and enhanced.
4. The Union shall establish an economic and monetary union whose currency is the euro.
5. In its relations with the wider world, the Union shall uphold and promote its values and interests and contribute to the protection of its citizens. It shall contribute to peace, security, the sustainable development of the Earth, solidarity and mutual respect among peoples, free and fair trade, eradication of poverty and the protection of human rights, in particular the rights of the child, as well as to the strict observance and the development of international law, including respect for the principles of the United Nations Charter.
6. The Union shall pursue its objectives by appropriate means commensurate with the competences which are conferred upon it in the Treaties.
Provision 4 was not initially there, at least not in its current form; it was modified by the Maastricht Treaty that created the euro. That was mid 90s. But the other stuff represent the founding principles. Promoting peace is listed first because it was the most important.
Yes, labor mobility is an aim of the union but it's a lesser goal subsumed within the framework of peace and prosperity as outlined by sections 2 and 3 pasted above.