If there is infinity number of small arcs on top of diameter (can assume it is a simple line which has a length of $2r$) of a half circle (radius is “$r$”) why $\pi r$ is not equal to $2r$?

If there is infinity number of small arcs on top of diameter (can assume it is a simple line which has a length of $2r$) of a half circle (radius is “$r$”) why $\pi r$ is not equal to $2r$?

You're making an assumption here: if the limit (in some sense) of a set of curves is some limit curve (the diameter in your case), then the limit of the LENGTHs of the curves must exist and equal the length of the limit curve.
That assumption is wrong* --- not everything in the world commutes with taking limits, even though many people who are not very familiar with limits assume this mistaken idea --- and for arclengths, the limit of the the curves and their tangents must be the limit curve and its tangents for this property to hold**. Since your curves all have vertical tangents, while the limit curve -- the diameter -- has only horizontal tangents, you don't get the arclength-limit property.
*Your example constitutes a proof that it's wrong!
** Proving this claim is comparatively difficult; you certainly need to know something about limits and calculus and perhaps even a bit of real analysis.
Simply because $c_n(r)=\pi r$ for all $n$, and thus, it's impossible to have $$\lim_{n\to \infty }c_n(r)=2r.$$
Note that the curvature $\kappa$ of each circular arcs grows with the number of division $n$, that is $$\kappa=\frac{n}{r}$$
The curve never approaches to a straight line in terms of smoothness, the curve is of class $C^0$ not $C^1$.
Your function gets more and more bumpy as n approaches infinity; however when you take the limit all of the bumps get taken out (the bumps contributing to the perimeter).
Put another way the regions where the derivative is nonzero contribute to the extent that the perimeter is not 2r but when the limit is taken with respect to the function it is not taken with respect to the relevant differential structure.