Because this only happens if MacigQuotes is included in your php configuration, which, as far as I know, is quite rare at the present time. In addition, mysql_real_escape_string also avoids other MySQL related characters.
http://php.net/manual/en/security.magicquotes.php .
, , ^^
: , xampp php.ini , , :
; Magic quotes
;
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off