On a more technical side, here is what happens exactly.
First, the variable is allocated on the stack, and a stack allocation is a no-op (well, actually it's a pointer addition); the stack has a fixed size and is already allocated when the program starts, and the address of each object declared on the stack is pre-computed by the compiler upon compilation.
Secondly, it's a POD structure: it has only public POD members and a trivial constructor, therefore its construction is - again - a no-op.
As a consequence, declaring it inside or outside the loop doesn't make any difference at all, since both its allocation and construction are empty operations. There's just some space pre-allocated for a sf::Event variable somewhere on the stack, which is ready to be used when the variable is used later in the code.