What is the advantage of a rear engine car?

It’s more than achieving 50/50 weight distribution. A front engine car can have a near 50/50 weight distribution as well (eg, BMW). Mid engine cars concentrate their weight in the middle, allowing them to easily change direction. Try to hold a heavy dumbbell with the weights on both sides of your hand and rotate it. Then try to roll it on the ground. The dumbbell would have even weigh distribution in both rotation modes, but the latter method will be easier to spin.

The disadvantage of a mid engine car is that it is easier to change direction. It is a double edged sword. If it spins, it just snaps into a spin instead of breaking away gradually like a well thought out front engine car and is harder to recover. For a race car designed for the sole propose of winning a race, this is the way to go. Otherwise, snap overseeing is not desirable on public road