Ok.... It is in the rule book
A player from a Swedish club was dismissed from the pitch after he was issued a second yellow card for celebrating his hat-trick goal by jumping into the stand and applauding himself.
Upon returning to the pitch, the referee swiftly produced a yellow card to Medi Dresevic of Norrby IF. This was his second bookable offence, thus amounting to a sending off.
A shocked Dresevic remonstrated with the referee but he clearly did not have the support of his teammates while doing so. And why? It's nothing to do with any issues with team morale. They were just instantly outraged that Dresevic had disregarded one of the man offences that merits a yellow card.
According to the universal football rulebook, players are prohibited from leaving the pitch without the head official's permission. Just like when they whip their jersey off and on occasions when they use profane language, a yellow card is the only outcome.
It might be seem a bit harsh but rules are rules.