I guess the idea was that spectators (tv/online especially) would immediatelly know what driver it is.

Problem is that the numbers are only from side/rear which you often see only in a split second or often not at all on dusty gravel.

However the teams actually fixed this themselves with putting the flags on the roof wents/different mirrors.