I decided only to link to these. If you google “pilgrimage on knees” you will get pages and pages of this stuff.
Where does it come from? What is the doctrine?
The below reference “penance” repeatedly
Ireland:
“For most Catholics who visit Mt. Croagh Patrick, especially on Reek Sunday, the pilgrimage to the top of the sacred mountain is an act of penance. Accordingly, some untake the journey barefoot or even on their knees. The summit has a small chapel where Mass is held each day”
sacred-destinations.com/ireland/mt-croagh-patrick.htm
Canada:
“In the morning, when we got to the basilica, my mother and I stayed in the lower chapel, praying as my father made his way up the stairs on his knees. I said my prayers in a French accent, pretending that I was praying in French. My mother held her silver rosaries. When my father came down to get us, he looked refreshed, young, triumphant. Back at the motel, my mother bathed his raw and bloody knees with iodine, then bandaged them. I was proud, but confused; I thought my father brave in his wounds, but my mother’s unaccustomed tenderness seemed strange, as did my father’s lofty, calm acceptance of her ministrations.”
newyorker.com/archive/2005/04/18/050418fa_fact3
Mexico
"And as the Basilica gets closer, it becomes apparent that there are people approaching it on their knees.
A man with a small baby in his arms shuffles up to the church stairs, only getting to his feet when reaching the base of the Basilica. Behind him is a young girl with a bunch of flowers clutched to her bosom, walking on her knees towards the church.
And to my side, a girl in an orange T-shirt clings to the forearms of a friend standing in front of her as she struggles along painfully.
Towards the gates is a young man of no more than twenty with the legs of his jeans rolled up so as to bare his knee-caps for the concrete ground."
mexicoreporter.com/2007/12/12/mexicos-faithful-make-annual-pilgrimage-on-dia-de-la-virgen/
Italy:
"In Rome:
And finally don’t forget to include in your pilgrimage a visit to the Scala Santa (Holy Stairs) in Rome. This is where Catholic pilgrims for centuries have ascended on their knees in an act of penitence, the same stairs (originally from Jerusalem) that Jesus was led up and down by Pilate several times during His Sorrowful Passion. A Catholic can obtain a plenary apostolic indulgence, applicable to the Poor Souls in Purgatory, every time they ascend these steps on their knees. This sacred site, which is maintained by the Passionists Order, has been considered by several Popes to be the holiest place on earth."
stgemma.com/gallery/eng_itinerary.html