It is illegal to step on any piece of the nation’s currency.
Thailand takes their king pretty seriously, and it’s against the law to insult him. Since the king’s picture is on the Thai currency, and the foot is considered particularly dirty, stepping on a piece of currently is equated to a direct insult of the king. This action could land you a beating, or jail.