In the days when “carpet” retained its original sense, “a thick fabric used to cover tables,” to have something “on the carpet” had the same meaning that we now give to “on the table”; that is, to have something up for discussion, for consideration.
Such was the usage in the early eighteenth century and is still common usage in England, and is, as well, the intent of the French sur le tapis, and the German aufs Tapet.
But dainty ladies found, even in the fifteenth century, that these thick fabrics also made ideal floor coverings and began to use them, first, in their bedchambers, and then in other private or formal rooms of a house. But they were for the use of the gentry.
The occasions when a servant might “walk the carpet,” as the expression went, was when he or she was called before the mistress or master of the house for a reprimand.
Though this latter expression, coined in the early nineteenth century, is still in use, it has been largely replaced, especially in America, by transferring its meaning to “on the carpet.”