Why the ray of light passing through optical center of a lens passes undeviated while when it passes through other points on the interface of the lens, it gets refracted?

Deviation is the change in direction of the ray while passing through the lens. The middle portion of the lens is comparatively flat and there is a point on the principal axis and inside the sphere through which all the undeviated rays pass.lens

“Undeviated” doesn’t mean that there is no refraction. When we say that there is no deviation, we only mean that the incident ray and the emergent ray are parallel to each other. For thin lenses, the refraction inside the lens is negligible and therefore we represent the ray passing through the optic centre as a straight line. But in the case of a thick lens, we cannot do so.

(See the diagram)