I wrote about this before: https://criticalresist.substack.com/p/retrofitting-capitalism-onto-the
tl dr yes it's on purpose, but not necessarily consciously. In the present day these stories exalt values that are compatible with 21st century capitalism. The King is rich, and the Knight is (mostly) free -- to travel, to act, etc. Both have agency. Serfs and other "lower-class" characters are often only represented in the background, and the cliché is kind of that they're "dumb" because if you don't go to college you'll end up picking vegetables.
Back in Victorian times they preferred their medieval stories to talk about duty and loyalty... to the capitalist employer.