A question has been bothering me.
If I have a smooth (for simplicity) 2 dimensional manifold $M$, how could I possibly specify a function on the manifold $f:U\subseteq M\to f(U)\subseteq \mathbb{R}$ in an unambiguous manner?
If I take into account than any open $U\subseteq M$ is homeomorphic to $\mathbb{R}^2$, still it is unclear to me how to identify any $p\in M$ with a tuple $(a,b)\in \mathbb{R}^2$. It seems I need a chart to achieve this identification of $p\in M$ with $(a,b)$ but which chart should one use? Isn't there a huge degree of ambiguity, with regards to the definition of $f$? It seems to me it depends on the chart I use to represent $p\in M$.
As it has been pointed out in the comments already, a smooth manifold is a set of points with a bunch of additional structure. As such, we can define a function $f$ (not smooth, or even continuous yet) as way of associating to each point $p\in M$ a real number $f(p)$. This is just a map of sets and makes no reference to charts.
However, we should really take advantage of the extra structure our smooth manifold has (other than just being a set) and define more "refined" functions (maybe continuous or smooth). To do this, we need charts. We will proceed as follows: first you and I will both pick our favorite charts around a point $p\in M$. Call your chart $\varphi_1: U \to V_1 \subset\mathbb{R}^2$ and my chart $\varphi_2: U \to V_2\subset \mathbb{R}^2$ where $U$ is a neighborhood of $p$. Now, you can go ahead and define a function $f: M \to \mathbb{R}$ (as just a map of sets for now). To check that it is smooth, or take derivatives, or do any sort of analysis at the point $p$, you will use your chart. In particular, $f$ is smooth at $p$ if the composition $$f\circ \varphi_1^{-1}: V_1 \to \mathbb{R}$$ is smooth at $\varphi_1(p)$. Now, if I want to check if $f$ is smooth at $p$, I will do the same using my chart. That is, I will check if the composition $$f\circ \varphi_2^{-1}: V_2 \to \mathbb{R}$$ is smooth at $\varphi_2(p)$. The important thing is that we should both get the same answer to any analytic question about the function $f$. In this example, we should agree on whether $f$ is smooth at $p$ or not. This happens if the composition $$\varphi_2\circ \varphi_1^{-1} : V_1\to V_2$$ and its inverse are both smooth maps. This is exactly the kind of thing that the "maximal atlas" definition of smooth manifolds guarantees will happen. For any choice of charts, the compositions like the one written above are required to be smooth maps.
Punchline: The definition of a smooth manifold requires picking a class of all allowed charts and ensures that these charts are all compatible (in the sense explained above). We may choose to define things on our manifold (like whether a function is smooth) in a particular allowed coordinate chart as long as this definition can be translated consistently between two allowed coordinate charts. This type of approach is familiar from discussing tensor fields on smooth manifolds. We are content with defining these "in coordinates" as long as the definitions transform correctly under a change of coordinate charts.