The sun is very bright, so bright that it is dazzling. The same is true of stage lights, car headlights on a dark night and the light from some industrial processes such as arc welding.
We say that we "look into" dazzling lights in general because we have to squint or use eye protection in order to be able to make out details either in the light source itself, objects near the source or, usually, ones between the source and ourselves. We often can't see pedestrians or cyclists at night because of the glare from other cars' headlights that we are 'looking into' and stage performers often can't see members of the audience because they are 'looking into' the spotlights.
We do not say that we "look into" the moon when we gaze on it because it is never so bright that we can't see details of its surface or see other things near it or in front of it. A star can appear to be close to the moon, for example, and we can still see it quite easily.
There is also a difference between "looking into" the sun and "looking at" the the sun. "Looking into" means looking in the direction of the sun so that you are dazzled but "looking at" the sun means examining the sun in the same way as "looking at" the moon. It's just that we can only "look at" the sun by using special protective equipment or automatic equipment that does the looking for us.
As a final thought there are dangers in both looking into and looking at really bright sources like the sun and welding arcs: lights as bright as that can cause permanent damage to your eyes. Looking into car headlights and stage spotlights can mean that you can't see properly for a little while after you turn away but your eyes do recover, that's not necessarily the case with staring at the sun. You should also never look at the sun directly with a telescope or binoculars, people have been instantly and permanently blinded doing that.