to the House for whoever is able to find a way to it.” By “way” (sabīl) the hadith means possessing sufficient provisions and a means of transport that can carry a person to the House and bring him back to his family.
The purpose behind the legislation of pilgrimage is exactly what Allah has explained: “so that they may witness benefits for themselves and pronounce the name of Allah on appointed days over the livestock He has provided them… Then let them remove their griminess, fulfill their vows, and circumambulate the Ancient House” (22:28-29). The benefits of ḥajj accrue to the worshippers and not to Allah, for He is “Independent of all the worlds.” He has no need for pilgrims in the way a created being needs those who visit and exalt him; rather, it is the servants who are in need of Him, and so they journey to His House in recognition of that need.
As for why the obligation of pilgrimage comes after prayer, zakat, and fasting: prayer is the pillar of the religion and is performed five times each day and night; zakat follows because it is so often mentioned alongside prayer; fasting comes next because it recurs every year.
According to the majority of scholars, pilgrimage was made obligatory in the ninth year after the Hijrah. The Prophet ﷺ performed only one pilgrimage—the Farewell Pilgrimage—in the tenth year after the Hijrah, and he performed four ʿumrahs in total.