If you're really interested in a thorough breakdown of what happened, the book <em>Confirmation: How a Sacrament of God's Grace Became All about Us</em> is pretty good.
Long story short-- in the very early Church, Confirmation was conferred together with Baptism, usually by a bishop as the bishop has always been the ordinary minister of the sacrament. As Catholics started spreading out and it became harder and harder to find a bishop to do every baptism, baptisms started to be done by parish priests because it was imperative they were done ASAP after the baby was born because of the high infant mortality rates. The eastern Church decided to keep Confirmation with Baptism and allow blanket permission for priests do do confirmations. The western Church chose to keep the bishop as the ordinary minister of Confirmation and delay it until a later time when the bishop could confer it.
Eventually it was conferred at around the age of reason (around 7 years old) along with First Eucharist.
After the Protestant Reformation, it became the trend to delay First Communion until the teenage years to make sure people really understood Communion before they received it to combat Protestant heresies. So kids would receive Confirmation at around 7 and First Communion in the teenage years.
Then Pope Pius X decided it was wrong to deprive children of Holy Communion and order reception to start at around the age of 7.
After this, many parishes noticed a gap in their religious education program. If kids were given Confirmation and First Communion both at 7, there was no more carrot to dangle over them to keep them going to religious ed classes. Since the Pope told them they HAD to give First Communion at 7 but didn't say anything about Confirmation, parishes started flipping the order of the two sacraments and started withholding Confirmation until later to keep kids going to religious ed.
Personally I think that's a terrible reason to withhold a sacrament from a child. Sacraments shouldn't be viewed as carrots to keep kids coming to religious ed. Sacraments are free gifts of God's grace. I'm very happy more and more diocese are going back to the traditional order and conferring Confirmation before First Communion at about 7 years old.