It's not wrong. The divergence is only zero at points where there are sources or sinks of the electric field. The only possible sinks/sources of an electric field are points with charge. Charge density is a function that depends on the point, which tells you the amount of differential charge per differential unit of volume at every point.
If there is no charge density at a point, it's clear that it cannot be a sink (negative charge) or source (positive charge) of an electric field.
At the origin there is a charge that is the source of the electric field. However, the electric field is not defined at this point, a point charge cannot generate an electric field on itself. If you substitute r=0 in the electric field formula, you are dividing by zero, hence the function isn't defined there. Therefore the divergence of the electric field is zero at all points where it is defined.
Note that the concept of divergence of an electric field starts to become more useful when you have electric fields generated by charged objects. Every point in the object has non-zero divergence, because there is charge there (hence it is a sink/source of the field), and there can be electric field at that point generated by the rest of point charges in the system (but not of that same point charge on itself).