With grid snap enabled, the drawing pointer does snap to the nearest grid intersection. However, the grid that’s displayed has z coordinate 0. So with a view other than the single plane orthographic views, the cursor may seem to snap to some poin other than grid, even though the point is at the intersection.
Here’s an example:
In this video, I have set the Origin to 3d cursor, and snap plane to xy. So the cursor always remains in the XY plane of the 3d cursor. First, I have set the cursor at z coordinate value of around 1, so the grid snapping in perspective view appears not to snap to the intersection. But if you look at the curve drawn from top and front views, you will see, all the points are on grid intersection of an xy plane that’s exactly at the height of the 3d cursor .
In the second case, I have set the 3d cursor to origin, so the z value is zero. Now, even in the perspective view, the pointer always snaps to the grid, because the grid z location and 3d cursor z location, both coincide in this case.
You might want to watch the snapping framework video to get to know all the snapping options.