Because "q" and "p" are both reference variables:
string p = null;
Declares a variable called p, assigns it the value
null
string q = p;
Declares a separate variable called q, assignes it the value currently in p - i.e.
null
p = "sample";
Assigns p to refer to a string which contains "sample".
This does not alter q - it remains with the previous value of
null
It's a bit like cars. If you have two cars, "p" and "q" and you drive "p" to the shops, would you expect "q" to follow you there on it's own?