Why defining tangent bundle? I'm learning a bit about smooth manifolds, and currently I'm learning about tangent bundles (just definitions mainly) and vector field.

This is my reference : Tu's Introduction to Manifolds.
I was also watching a video about tangent bundles (because I was struggling with the concept).

Once I understood the definition however I realized I have an issue understanding why we need the notion of tangent bundle. I can't remember where I read this but am I right when I say that tangent bundles are necessary if we want to generalize the notion of function on a manifold?

Consider a smooth manifold $M$, if we wanted to define what a vector field is to me the definition should reflect the fact that for each $p \in M$ we have a $v \in T_p M$, therefore it should be a map.

This is probably the key why such association isn't good as definition because a map needs both domain (in this case $M$) and an image space, however my naive definition involves for each $p$ a different space $T_p M$ and this is why we need the notion of tangent bundle.

Is this observation correct?
Remember that the tangent bundle is the disjoint union of the tangent spaces:
$$TM = \coprod_{P \in M} T_P M.$$
It has the topology of a smooth manifold in the following manner. Let $(U_\alpha, \phi_\alpha)$ be an atlas for $M$, and let $\pi: TM \longrightarrow M$ be the natural projection, i.e. if $(P, v) \in T_P M \subset TM$, then $\pi(P, v) = P$.

Edit: On the Why? bit

The point of this is just to establish a mathematical framework in which we can talk about points on a base manifold, and all the possible curves through any point on the manifold. We can talk about the base points $x$, together with possible directions at $x$.
Actually we know how to do calculus (differentiation, integration...) for functions on $R^n$. And if,
$f:M\rightarrow N$
is smooth map then its differential
$df:TM\rightarrow TN$
Will be map between tangent spaces so overall we will need knowledge of tangent spaces if we want to study smooth maps between manifolds.