Question: Why a holomorphic function is infinitely differentiable just because of satisfying the Cauchy Riemann equations, but on the other side, a two variable real function that is twice differentiable is not infinitely differentiable?

I'm asking this for two reasons:

1) $\mathbb{R}^2$ is somehow an analog to the complex plane (they are isomorphic).

2) Holomorphic means that is differentiable in any direction of the complex plane, so why if a function is differentiable in any direction of the real plane then it is not infinitely differentiable?

Answer: 
Even though $\mathbb R^2$ and $\mathbb C$ are isomorphic as real vector spaces, they are very different in some algebraic respects, which crucially influence the notion of differentiability. Recall the key idea that a function is differentiable at a point if it has a best linear approximation (more precisely, a constant plus a linear transformation) near that point. 

In the context of functions $\mathbb R^2\to\mathbb R^2$, "linear transformation" means a transformation that respects addition of vectors and multiplication by real scalars. In other words, the transformation respects the real vector space structure of $\mathbb R^2$. It is well known that such linear transformations are given by $2\times2$ real matrices (once one has chosen a basis for $\mathbb R^2$). 

In the context of functions $\mathbb C\to\mathbb C$, on the other hand, "linear transformation" means a transformation that respects addition of vectors and multiplication by *complex* scalars. In other words, the transformation respects the complex vector space structure of $\mathbb C$. It is well known that such linear transformations are just multiplication by a single complex number. That's much more restrictive than multiplying by an arbitrary $2\times 2$ real matrix.

Specifically, if we use $\{1,i\}$ as our basis for $\mathbb R^2$, then the $2\times 2$ real matrices that correspond to *complex* linear transformations are just those of the form $\pmatrix{a & b\\-b & a}$. Because complex linear transformations are a very special sort of real linear transformations, complex differentiable functions are a very special sort of real differentiable functions. That "specialness" ultimately accounts for all the miraculous consequences of complex differentiability.
The usual presentation of holomorphic functions (and complex analysis in general) is misleading; the analogue of a holomorphic function to a function on the real line is *one whose derivative is zero*!

Recall one nice property of holomorphic functions: if a point $p$ lies inside a region $D$, which has a boundary $C$, then you can find the value of a holomorphic function $f(p)$ by *only* a contour integral about the path $C$.

The analogue of this property to the real line is as follows: let there be a region (an interval) $D$, whose boundary is two points $C\_+$ and $C\_-$. Then the value of a function at a point $p \in D$ is characterized *entirely* by the value of the function at $C\_+$ and $C\_-$. The only way this is possible is if $f$ is *constant* on $D$ and has identical values at $C\_+$ and $C\_-$.

(Note: it's possible that $f$ has a delta function source in the region instead, but this is just the analogue of a meromorphic function.)

This generalization--functions whose derivatives are *zero*--is what is ultimately more useful when you start looking at vector calculus and higher-dimensional real spaces. Scalar fields that obey $\nabla \varphi = 0$ obey the exact same property of being fully characterized by their boundary values.

Similarly, the correct analogue on $\mathbb R^2$ is for a vector field $F$ to have vanishing divergence and curl: $\nabla \cdot F = \nabla \times F = 0$. Such vector fields also obey the same basic property of holomorphic functions.