It was a sacrifice to the Lord, either as an atonement for sin, or as a fellowship offering, celebrating the Lord's goodness and salvation of his people. No, nor did it mean that the firstborn sons were killed. God specifically forbade human sacrifice. Redeem every firstborn among your sons. God taught Israel the principle of redemption by substitutionary atonement.
Redemption means buying something back.
God redeemed Israel out of slavery. Israel were to remember that they were redeemed by redeeming others, both animals and men. God made it easier for the poor by giving them the option of substituting a lamb, which was cheaper, for a firstborn donkey. And he commanded them to redeem every firstborn human son. At the time of Jesus this redemption price was five temple shekels of silver.