Mobs can see other mobs without line of sight.
On my survival world I have had some interesting things happening.
I have seen a baby zombie stuck staring at the ground. I hit it it got knocked back ran back to where it was and was looking down again. I made a copy of the world and went into creative and found a cave about 10 blocks below the zombie. It may have been trying to mount a zombie thag was in there (but had since despawned or wandered off before I could see it,)
An other example is me being in my house near a wall and a creeper attacks me from the other side. I had no transparent blocks around me as a zombie broke my door which I replaced with blocks. So the creeper attacked without a line of sight.
So the zombie saw a another mountable mob through the ground and the creeper attacked me through a wall.
The image is of the baby zombie,