The $_GET variable p
(ie. ?p=) is reserved in WordPress, as the default way to server up post IDs. While most people like to transform their URLs, the default is www.domain.com/?p=123.
Wordpress specifically looks for this parameter (it is also served as the wp_shortlink
), and if it is not numeric is will automatically set the value to 0.