Why did we define the concept of continuity originally, and why it is defined the way it is?
The concept of continuity is a very important idea in topology. Though I am using it all the time, but indeed I don't know what is the original purpose for us to define this concept. And I also don't understand why we define the continuity in topology as if $V$ is an open set in $Y$, $f^{-1}(V)$ is an open set in $X$
Continuity has a history before topology. Ask yourself how to define a continuous function $\mathbb R \to \mathbb R$ - maybe one that you can draw the graph of without taking your pencil off the paper.
What makes it continuous? Well one candidate was the intermediate value property. Then people discovered pathological functions like $\sin \frac 1x$ near $x=0$ - or for a function which takes all real values in any interval (and in consequence has the intermediate value property) but is nowhere continuous try the extraordinary Conway base 13 function.
Then, in the metric context, epsilon-delta definitions were developed. But the thing about drawing the curve with a pencil got lost, because most continuous functions $\mathbb R \to \mathbb R$ have no defined arc length. Differentiable and smooth functions took over, since they were the ones people dealt with most often.
If you want to see another challenge to the formalisation of mathematics in this way, research the history of the Jordan Curve Theorem.
The idea of continuity developed into topology - the development of the two is intimately linked - one way of thinking about topology is to formalise it as what you get when continuity is the most significant concept you have. Now that is overstating it a bit, because most topological objects of interest have rather more structure than that. But that, to my way of thinking, is why topology and continuity go together.
As for why continuity is defined as it is ... Topology deals with open sets. Continuity is concerned with functions. It just happens that the "inverse image of an open set under a function is open" coincides with the best intuitions we had of continuity before we abstracted it from a metric context.
The two main reasons we defined continuity, in my humble opinion, are as follows:
Continuity makes functions tame. Try to prove a proposition about arbitrary functions between topological spaces. You won't be able to get anywhere. Most topological spaces we deal with are so large that functions between them can behave in wild ways. If you don't forced them to respect some kind of structure coming from the topology, you won't be able to prove anything about them. If you force functions to ``respect topology'' by being continuous, then you'll get theorems such as: Compact sets map to compact sets under continuous maps.
In metric spaces continuity allows you to approximate. The standard $\epsilon\delta$-defintion of continuity allows you to approximate the value of a continuous function. It says: "If you give me a continuous function, a base point, and an error term, then I'll give you a range around your base point where your function is close to the value it takes at your base point." Approximation is good enough for most purposes, and it allows you to talk about limits.
One way to rationalize the choice of definition of continuity in arbitrary topological spaces is that the definition we've chosen specializes to the $\epsilon\delta$-definition in metric spaces. There are some deeper reasons, but I think that that is a good place to start.