But the penalty seems illogical, If the referee sees the dive, it's a yellow card. If not, it's a two match ban?
It's very logical. It's been explained many times already here, mate.
If a player dives and the ref sees it, he gives him a yellow.
If a player dives, wins a penalty and his team scores, then there is no logic to punish him with a yellow. What lesson will he learn if he gets just a yellow?
This way they make sure that even those who manage to trick the ref won't remained unpunished. This is done in order to teach the "divers" that their choice is:
1. Dive and get a yellow
2. Dive and be suspended for 2 matches.
The point is to make the players think twice before they dive and to know that they lose in any case, even if they manage to trick the ref.
It's a very good and logical rule. The wrong thing about it is that they don't do it all the time but they do it once a season, only when there is media pressure. They won't achieve anything if they punish only 1 out of 100 dives.