This is just random thought based upon Iitaka's Algebraic Geometry Thm 1.15 proof. Let $X$ be a scheme and denote $A(X)$ ring of global sections of $X$ associated to the scheme. In the proof of $Spec,A(-)$ adjunction(to see adjunction, use $Sch^{op}$ category instead), $Hom_{Sch}(X,Spec B)\cong Hom_{Ring}(B,A(X))$, the book constructed an arrow $X\to Spec(A(X))$ which enjoys universal arrow property.
In other words, given $X\to Spec(B)$, the map $X\to Spec(B)$ factors through $X\to Spec(A(X))\to Spec(B)$.
Recall Gelfand transform.(in accordance to Lang's Real and Functional Analysis book.) Let $A$ be a commutative Banach algebra. Let $M$ be the set of maximal ideals of $A$. Now we have $A\to C(M,C)$ map where $M$ is really in bijection to characters of $A$. So in effectives $A\to C(\hat{A},C)$ where $\hat{A}$ is the set of characters and this map is given by evaluation.
$\textbf{Q:}$ It is clear that $A(X)$ is functions globally defined over $X$. Both construction maps starting space into a function space. What is exactly analogy between them?(i.e. $X\to Spec(A(X))$ and $A\to C(\hat{A},C)$) Note that $X\to Spec(A(X))$ is an injection for topological space and for sheaves, there is no guarantee to be injection whereas $A\to C(\hat{A},C)$ is just a map which may not be bijection unless $A$ is commutative unital Banach algebra.