The main advantages over the .50cal is that you don't actually have to hit your target with the projectile, and it doesn't depend on velocity for AP performance.
Just like the Mk-19, the 25mm has a radius that will allow it to produce casualties even if it doesn't directly impact a target (enemy troop). You have to actually hit-to-kill with the .50. With the OSCW, you only have to get close enough. It's main advantage over the Mk-19 is the weight and size of the ammo, which makes it a higher-cap weapon for the same weight/volume of ammo carried (just like the old 5.56mm vs. 7.62mm deal).
Penetration is great with a .50 close in, but as range increases, penetration goes down with the loss of velocity. Beyond 200 meters, a .50cal won't reliably get through BMP side armor or it's equivelent. The current 40mm will regardless of range because it relies on the explosive force (which stays the same over range) ranther than kenetic energy (which drops with velocity loss over range). I don't know what the 25mm really does penetrate, but that's the concept at least.
I doubt that the M2 will ever get fully replaced any time soon. There are situations where a kenetic energy kill weapon is better. Shooting through walls into people on the other side is one I can think of, as is heavy brush/jungle. It's also a heck of alot cheaper to shoot .50BMG than some super-fuzed 25mm.
Ross