It's usual in Complex Analysis see some points of the domain of a function as undefined. See for example as Wikipedia defines a removable singularity:
I've seen functions with undefined points in real calculus books as well (they call these points as discontinuities).
I don't feel very well with such points, the definition of functions says clearly that points should be defined in its domain and functions with undefined points break this rule which is unacceptable mathematics speaking.
So where am I wrong?

The definition of a singularity is as follows: Let $D$ be an open set in $ \mathbb C$, let $z_0 \in D$ and suppose that $f$ is a holomorphic function on $ D \setminus \{z_0\}$. Then $z_0$ is called an isolated singularity of $f$.
Observe that $f$ is defined on $ D \setminus \{z_0\}$ !
The singularity is called removable , if there is a holomorphic $g$ on $D$ such that
$ f=g$ on $ D \setminus \{z_0\}$