The altar was the place of sacrifice, repentance, rededication, and acceptance by God.
Repair the relationship with God before repairing anything else.
The people returned to their worship as they did before the exile and it must have been somewhat surreal because they must have wondered if they would ever return.
They were reminding themselves of the greatness of God as they celebrated in the ways following the Exodus.
The joy of returning was mixed with the pain of the sin that caused the exile.