Why is it allowed to Generate Keys inside the game?
The adversary is permitted to generate the keys

because we're not restricting the adversary's internals.

(For example, the adversary is also permitted to compute the parity of y,

and to generate a random element of {45,56,62,68}.)