Why is continuity required for sheaf-theoretic definitions of a structure on a space For example, I take differentiability, analyticity, and algebraicity(of a function).
All(more or less) imply continuity. So when we define a differentiable function on $\mathbb R^n$ or an analytic function on $\mathbb C^n$, or a regular map on an affine space, we do not explicitly require that the functions are continuous. It follows automatically from the stronger condition.
But, when I look at the definitions in books of a global structure using sheaf theory, for a global definition of a morphism, ie on a differentiable manifold or an analytic space, or an abstract algebraic variety, the definition of a morphism requires a priori that the map be continuous, and then one requires that there is additionally a morphism of sheaves of algebras(of the suitable type of structure sheaves, depending on the local model used).
Why is this so? Is it something done for fancy, or is there a real need for the extra continuity assumption? I mean could things go wrong if this assumption is dropped?
 A: As Andrea hints, if you start with sheaves then you need continuity to even begin talking about morphisms of sheaves.
However, if you're interesting in just defining, say, a smooth map between manifolds then you can simply write "$f \colon M \to N$ is smooth if, whenever $c \colon \mathbb{R} \to M$ is a smooth curve then $f \circ c \colon \mathbb{R} \to N$ is smooth".  No assumption about continuity is needed there.
Indeed, once one gets to more exotic spaces, continuity becomes a hassle and is best left to one side.  For example, the evaluation map $E \times E^* \to \mathbb{R}$ is smooth for any locally convex topological vector space, $E$, but is only continuous for $E$ a normed vector space.
A: Let $M,N$ two manifolds and $f : M \to N$ a (set-theoretic) map. Then there are (at least) two definitions for $f$ to be smooth:
(1) For every ball $B \subseteq N$ the preimage $f^{-1}(B)$ can be covered with balls $C \subseteq M$ such that the induced maps $C \to B$ are smooth.
(2) $f$ is continuous and for every ball $B \subseteq N$ and every ball $C \subseteq f^{-1}(B)$ the induced map $C \to B$ is smooth.
Remark that in (1) it follows automatically that $f$ is continuous. However, the second statement in (2) does not imply continuity because it is possible that $f^{-1}(B)$ contains no ball at all, or just not enough.
The same is true for other subsheaves of continuous functions mentioned in the question.
A: The simple answer is because you are describing your "spaces" (manifolds, variety etc.) as locally ringed spaces, in particular objects in the category of topological spaces + more data. The arrows in the category of topological spaces are precisely continuous maps, so this is where continuity comes in. To be more specific, let $C$ be any category, and let $S:C \to Cat$ be any pseudo-functor (weak 2-functor). "Pretend" that $S$ is the assignment of each object $c \in C_0$ its category of "sheaves of algebraic objects", e.g. if $C$ is topological spaces you could let $S$ be $S:X \mapsto Sh_{rings}(X)$ which associates to a space $X$ the category of sheaves of local rings over $X$. For any such $S$, one can take its Grothendieck construction, which yields a category fibred over $C$, $\int_C{S} \to C$. The objects of $\int_C{S}$ are pairs $(c,s)$ with $c \in C_0$ and $s \in S(C)_0$ and the maps $(c,s) \to (d,t)$ are pairs $(f,g)$ such that $f:c \to d$ in $C$ and $g:f^*(t) \to s$ in $S(C)$, and the functor $\int_C{S} \to C$ sends $(c,s)$ to $c$ and $(f,g)$  to $f$. If $S$ and $C$ are taken to be $Sh_{rings}$ and $Top$, then you get exactly the category of locally ringed spaces, for example. By construction, the "underlying morphism" of a morphism $(c,s) \to (d,t)$ is a morphism $f:c \to d$. If $C$ is $Top$, then of course, this means it is a morphism in $Top$, hence continuous.
