Such a lens (flat on one side, convex on the other) is called a plano-convex lens. Most magnifying lenses are double-convex, supposedly to decrease the distracting reflection a flat surface yields. A double-convex magnifying lens gives the same magnification with two fairly gentle curved faces versus one flat face and the other severely curved.
In a plano-convex lens, the light still bends towards the optical center, no matter which way the light travels through it.
In these two cases, the light enters from the left. (sorry; I forgot the arrows).
The reason it does has to do with how light reacts at the edges of the glass, and what angle the light hits the edge.
When light enters a piece of glass, it transitions from low-to-high density (air-to-glass), bending towards the imaginary line(*) perpendicular to the surface:
* The line that is perpendicular to a surface is also known as the surface normal.
When light leaves a piece of glass, it transitions from high-to-low density (glass-to-air), bending away from the normal:
The easiest way to think of it is to know how light refracts through a flat piece of glass. This principle can be applied to any particular point on a lens:
The refraction behavior depends entirely on the angle at which the light hits each edge, and whether the transition is low-to-high density, or high-to-low density.
An analogy comes to mind that someone taught me on how to remember how light bends when refracted by glass..
An axle breaks off a kid's go cart, and rolls down the hill (light beam). On the way down, it hits an obliquely angled patch of grass in the road (lens):
As the leading wheel hits the grass patch, it slows down, pivoting the axle around it. When the other wheel hits the grass, both continue at the same speed in this new direction.
Then, as the leading wheel clears the grass patch, it resumes the normal speed it normally travels on concrete, pivoting the axle around the trailing wheel still in the grass patch. The axle continues to pivot until the other wheel clears the grass, and the axle resumes a trajectory down the hill parallel to its original path, though now somewhat translated to the right.