The basic rule for targeting reads:
To target something, you must have a clear path to it, so it can't be behind total cover. If you place an area of effect at a point that you can't see and an obstruction, such as a wall, is between you and that point, the point of origin comes into being on the near side of that obstruction.
The relevant point here is that there must, first, be a clear path, and two, that path is traced from the caster to the target. In the case of the eye, the line of sight is being drawn from the eye, which is not the caster:
A hag coven can craft a magic item called a hag eye, [...] A hag in the coven can take an action to see what the hag eye sees if the hag eye is on the same plane of existence.
The description states that the hag (the caster) is looking through the eye. The eye is not what is casting the spell. Compare this to the wording of Find Familiar:
[...] Finally, when you cast a spell with a range of touch, your familiar can deliver the spell as if it had cast the spell.
In this case, the Familiar is explicitly described as the caster of the spell, unlike the hag eye.