From the manual: http://php.net/manual/en/language.references.whatdo.php
Note: If you assign, pass, or return an undefined variable by reference, it will get created.
As to why, I would just be speculating that php allocates the memory and assigns $a and $b to both look at that spot in memory. It is a documented behavior though.