The above answer aptly describes what this marriage would represent in real terms, if we assumed the action of the story to be taking place within a real kingdom. Within the context of the story itself, however, and the wider context of literature and fairy tales, it is not uncommon for a person of low birth—usually a man, but not always so—to succeed in winning the hand of a princess (or prince) through bravery, or as a reward for some kind of challenge of endurance.
This trope is referred to as "The Hero's Reward," "Engagement Challenge," or other similar names. It can be seen in many fairy tales and folktales such as, for example, those following the "Princess and Dragon" archetype, where a local boy of low birth slays a dragon to win the hand of a princess. In this instance, the courtier in question has not undergone any challenge, but the situation in the story is set up so that the reader might expect a challenge to arise between the boy and the tiger, before the princess's true motivations are revealed.
When a man or woman of royal blood falls in love with and marries a commoner, this is known as a morganatic alliance or marriage.
The term "morganatic" refers to the German "morgengabe," which is the gift bequeathed to the bride by her royal groom, the morning after the consummation of the marriage. Historically, in Germany, the commoner spouse and any resulting children from the union could not inherit the titles nor the privileges that came with the royal husband's position.
In ancient times (as in the story), morganatic alliances (whether they resulted in marriage or not) were frowned upon. The consensus was that royalty were expected to behave according to prescribed social norms. Therefore, for the purposes of preserving the royal bloodlines to the throne, only marriage or sexual unions with other royals was considered acceptable.