In most programming languages, integer and real (or float, rational, whatever) types are usually disjoint; 2 is not the same as 2.0 (although most languages do an automatic conversion when necessary). In addition to technical reasons, this separation makes sense -- you use them for quite different purposes.
Why did they choose to say $\mathbb{Z} \subset \mathbb{R}$ in math? In other words, why are 2 and 2.0 considered the same?
When you are working in $\mathbb{R}$, does it make any difference whether some elements, eg. 2.0, also belong to $\mathbb{Z}$ or not?
If you want to do things very formally, the integers are in fact not a subset of the reals: they are entirely different constructs (which I guess is more or less what you are saying in your question). However, the reals do contain the set $$\{\,\ldots,\,-2.0,\,-1.0,\,0.0,\,1.0,\,\ldots\,\}$$ which "looks just like" the integers. The usual terminology is that the sets are isomorphic. If you take any true statement in the arithmetic of integers, and replace each integer by the corresponding real number, the result will be a true statement about the real numbers. For example, the statement $$2+3=5$$ corresponds to $$2.0+3.0=5.0\ .$$