The definition is provided in question: Germs of a $C^{\infty}$ function at $p$, and the derivation at $p$.
I am quite confused that why using “the equivalence class of functions defined in a neighborhood of p and agree on some possibly smaller neighborhood of p”. Why not just defining on all smooth functions? As the section “Definition via derivations” on https://en.m.wikipedia.org/wiki/Tangent_space does
You could define it either way. A priori, you might worry that these are different for two reasons:
As you already understand, the question linked above shows that there is nothing to worry about in (1); $Df = Dg$ as soon as $f$ and $g$ agree in a neighborhood of $p$.
As for (2), the point is that there will always be something in the equivalence class of your germ which extends to all of $M$, although you may have to shrink the neighborhood to get it. (For instance, in the given example, restrict the tangent function to $(-\pi/2 + \epsilon, \pi/2 - \epsilon)$ and then extend it to $\mathbb{R}$ by smoothly extending the graph however you like -- you know you can do this in generality thanks to the existence of bump functions and hat functions.)
So the definitions are equivalent. I guess it's reasonable to argue: "why did you make me think about this abstract thing like a germ, if you didn't need it for the definition?" The point is that derivations act a bit more naturally on germs than on global functions, and in particular, this generalizes better to other types of geometric structures.