I’m genuinely curious here from anyone who’s been/trained as a ref. Why do refs tend to wait for the outcome of a tackle/coming together and only call a foul if the player getting fouled loses the ball or goes to ground?

I can’t help but worry that there’s definitely a problematic element of encouraging either diving or fouling a player back from this sort of situation. It’s not the same as an advantage either, I understand the point about keeping the game going but is that the responsibility of a referee?

I’ve definitely played in games where refs have arguably endangered players by not punishing wild/vicious tackling and just wonder if it’s actually in the rules or just a cultural thing?