Fourth wall breaking reward acknowledging players who achieved something special.
After the story ending of the game, and after collecting all power moons, the player can tackle the hardest challenge of the game, called the “Darker Side of the Moon”. It features many of the game mechanics at their hardest level, and no checkpoint at all.
The level ends by using electricity cables (Mario can ride through them) without any challenge to display the message “THANK YOU” to the player.
This part of the game is reserved to the most invested players, so the challenges and rewards are tailored to them. The game developers breaking the fourth wall by writing a message in the level is a great way to reward the players who accomplished something special. It is as if the developers acknowledged their feat.
Note that Mario Odyssey does the same thing in normal levels by placing invisible coins that are revealed if the player reaches hard and unusual platforms (which require a combination of commands that are not directly taught in the game).