extensions are basically native code written in c/c++
while all php code goes thru an interpreter.
native code is faster than interpreted code.
though it won't make sense to make a module for everything and stop using PHP, but for very processor intentive applications, or in case you wish to extend PHP, add a few more features etc. then extensions come into play.