TITLE: The definition of continuous function in topology
QUESTION [13 upvotes]: I am self-studying general topology, and I am curious about the definition of the continuous function. I know that the definition derives from calculus, but why do we define it like that?I mean what kind of property we want to preserve through continuous function?

REPLY [4 votes]: I want to add a bit to Matt Pressland's nice answer:
Sometimes it is useful to think of the notion of a 'continuous' function as more 'primitive' than the notion of a 'topology'. For example:

Subspace topology is what makes the inclusion map continuous, i.e. choose the basis of the topology such that the inclusion map is continuous. 
Product topology is what makes the projection map continuous
Quotient topology is what makes the quotient map continuous