In many Mathematical theories, to study an object, we usually consider the set of all maps from that object to some other object. For example, in differential geometry, we study the smooth maps from a manifold $M$ to $\mathbb{R}$. Or in Algebraic Geometry, we consider the structure sheaf, which is the set of maps from a variety to $\mathbb{A}^1$.

So, is there any heuristic idea about why we don't do the other way around, i.e. study the set of all maps from some object to the object we want to study (at least in the two examples above)? Would this give us any more information? And also, is there any subject in which we do that?

Edit: One more clarification that might make my question clearer. In algebraic geometry, when we write an $R-$scheme $\mathrm{Spec} A$, already implicitly, we are viewing $A$ as the ring of all $R-$functions from $\mathrm{Spec} A$ to $\mathrm{Spec} R[x]$.

Edit (based on Qiaochu Yuan's answer): maps in seem to give us local information while maps out gives us global one, at least in Differential Geometry and Algebraic geometry. For example, to learn about the tangent space at a point, we look at the map $I\to M$ (in differential geometry) and $\mathrm{Spec} k[x]/(x^2) \to X$ (in algebraic geometry). Is there any more example along these lines?

toan object are interesting, because of Yoneda's lemma, which says that maps to an object contain essentially all information about that object. See mathoverflow.net/questions/3184/… – Kevin H. Lin Nov 27 '10 at 19:25