Real Madrid usually plays aggressively in midfield against the opponent's press, which can lead to fouls and, consequently, yellow cards.
Real Sociedad often uses an aggressive pressing setup throughout the match, especially against dominant teams, which increases the risk of cautions.