Why not? Most languages have a standard library that does all kinds of simple but useful stuff. PHP is aimed at the web so a function that deals with part of the web/non-web mismatch seems like a useful thing to include.
Removing it would simply cause newbies to have to wrange with str_replace to build trivial web apps.
Removing it would simply cause newbies to have to wrange with str_replace to build trivial web apps.