No, you are absolutely correct on that. It did happen, yes, but most of the time they came from noble backgrounds. Usually, knights had to have their lineage traced to see if their family was noble to compete in events, like the joust and swordfighting. Usually, they had to have 2 or 3 generations of nobility in their lineage consecutively leading to them, other than themselves.
in addition, I did some research and I found that many kings actually still kept the title "Knight" even as they were kings. For example, Charlemagne commonly referred to himself as a knight when he was the ruler of the Franks (Who became the French).