Rogue, Action - Attack, $5
If there are any cards in the trash costing from $3 to $6, gain one of them. Otherwise, each other player reveals the top 2 cards of their deck, trashes one of them costing from $3 to $6, and discards the rest.
Rogue can do two things: Gain a card from the trash, or (try to) trash cards from opponents.
A Moat/Lighthouse prevents an attack from affecting a specific opponent, but it doesn't stop other parts of an attack. If you opponent Moats your Witch, you still draw 2 cards, for example.
So in this case, the first Rogue playing gained the player a Silver from the trash. That isn't prevented by the Lighthouse, the opponent isn't involved in that. For the second Rogue playing, since there was no suitable card in the trash to gain, Rogue would now try to reveal and trash cards from the opponent, but since that opponent was protected by Lighthouse, it didn't happen.