I've been reading some articles/books on degree theory and I've noticed a detail that I can't quite understand fully yet.
Some articles define the degree of a smooth function $f:M \to N$ (where $M$ and $N$ are supposed to be compact, connected, oriented, smooth manifolds of the same dimension $n$) as $$ \text{deg}(f) = \sum_{x \in f^{-1}(q)} \text{sign}_x(f), $$ where $q \in N$ is a regular value of $f$ (that is, every point on its preimage satisfies that the differential on that point is onto. One can see that under these assumptions on the manifolds $M$ and $N$ this set $f^{-1}(q)$ is finite and thus the sum is well-defined), and where $\text{sign}_x(f)$ equals $1$ if $df_x$ preserves orientation, and $-1$ if it reverses it (I believe one can see that an oriented manifold has only two possible orientations), in the sense that $$ \text{sign}_x(f) = \frac{\det(J_f(x))}{|\det(J_f(x))|}, $$ where $J_f$ denotes the jacobian matrix of the coordinate representation of $f$.
The thing is, I've seen other articles where the assumptions on $M$ and $N$ are supposedly weaker. That is, they suppose they are oriented, smooth and $\textbf{without boundary}$ (I assume connectedness is implied as well but I'm not 100% sure about this).
So, my question is, what's really the difference between assuming compactness and empty boundary and why is the second one weaker? Is there any other assumption that has to be made in this case? Why is the condition that the manifolds have no boundary important when defining the degree? I have the intuition (given some things I've read) that maybe it's because if the manifold has boundary, then the invariance under homotopy would break, or something of the likes.
If someone has any good and intuitive explanation then I would really appreciate it. Also, I'm barely starting on this topic so maybe some of the things I've presented on this post are wrong or unclear. If so, please let me know as well. Thanks!
Edit: as someone in the comments rightfully said, I forgot to cite my sources. There are two specifically that I'm referring to:
Polo Gómez, J. (2020). Brouwer-Kronecker degree theory. Universidad Complutense de Madrid. This article is where degree is defined using manifolds without boundary. The work is in Spanish but I believe it is very well crafted.
Lee, J. M. (2013). Introduction to smooth manifolds (2.ª ed.). Springer. https://doi.org/10.1007/978-1-4419-9982-5. In section 17 Lee shows a brief introduction to in degree theory (in relation to the integral of $n$-forms and De Rham cohomology), and defines the degree using compact manifolds.