الْحُفَاة means barefoot people, الْعُرَاة inadequately dressed people, الْعَالَة people in poverty, and رِعَاءَ الشَّاءِ shepherds of sheep or goats. The description contrasts former hardship with later dramatic prosperity.
يَتَطَاوَلُونَ فِي الْبُنْيَانِ portrays rivalry in making buildings high. The verb suggests seeking to outdo one another.
Being a shepherd or rising from poverty is not itself blameworthy. The ethical danger arises when achievement becomes rivalry in pride and ostentation.