Let's follow what happens when we take a deformation retraction of $D^2$ to an internal point $p$, and attempt to use it to induce a deformation retraction of the quotient space $P^2(\mathbb R)$. Let's consider the quotient map $f : D^1 \to P^2(\mathbb R)$. Under that quotient map, for each $q \in \partial D^2$ its opposite boundary point $-q \in \partial D^2$ has the same image $f(q)=f(-q)$, a point of $P^2(\mathbb R)$ that I will denote $[q]$. Thus, the quotient map $f$ is two-to-one on $\partial D^2$, and is otherwise one-to-one.
Now, the function $f : D^2 \to P^2(\mathbb R)$ is indeed homotopic to, let's say, the constant map with value $p = f(0,0)$: simply use the homotopy $h((x_1,x_2),t) = f((1-t)x_1,(1-t)x_2)$.
But if you attempted to use this formula to define a homotopy from $P^2(\mathbb R)$, then for each $q \in \partial D^2$ you would be faced with an agonizing choice: Does the point $[q]=[-q] \in P^2(\mathbb R)$ follow the homotopy path $f((1-t)q_1,(1-t)q_2)$? Or does it instead follow the homotopy path $f((1-t)(-q_1),(1-t)(-q_2))$?
If these homotopy paths were the same, then there would be no trouble (and that's most likely what is going on the examples you allude to in your opening sentence). BUT, in this example those two paths are not the same. So our attempt to use the given information, i.e. to use the function $f$ and the homotopy $h$, in a well-defined and continuous fashion to build a deformation retraction from $P^2(\mathbb R)$ to a point, has broken down.
X/{\sim}and the former asX/\sim. This is not a software bug or an unintended quirk. Rather there is good reason to design the software to work that way. Remember that this software ultimately evolved from software written by Donald Knuth, who is not only a genius but is extremely attentive to, and conscientious about, just this sort of thing. – Michael Hardy Aug 12 '20 at 17:37