I try to understand a proof of the No Retraction Theorem which states that for any compact smooth manifold $M$ with boundary $\partial M \neq \emptyset$, there is no smooth map $$ f : M \to \partial M , \ \ \ f|_{\partial M } = id. $$
For the proof we suppose that such a map exists. Then by Sard's theorem we find a regular value $r \in \partial M$ and the preimage of $r$ under $f$ is a 1-dimensional manifold. The author now continues to say that the boundary of this preimage has to be a subset of $\partial M$. My questions is: Why do we know that?
This is due to the form that the regular value theorem takes for manifolds with boundary: