Suppose that we have two varieties $V,W$ (affine or projective, arbitrary). They are two algebraic object and as usual, we can define the map $\varphi: V\longrightarrow W$. It's easy to think about it as $\varphi(P)=(\varphi_{1}(P),...,\varphi_{m}(P))$ for any point $P=(a_1,...,a_{n})$ of $V$.
Then if we want to study the map $\varphi$, we have to care about $\varphi_{i} : V\longrightarrow k$, where $k$ is the base field.
My question is, why does $\varphi_{i}$ need to be a polynomial map ? Why do people care about the regular property? What did lead the mathematician to the idea of regular function ?