>>50466584In 2009, The Pokemon Company consolidated all its international branches into The Pokemon Company International (or TPCi for short) with the goal of establishing a global conglomerate that managed the Pokemon franchise as not just a video game series with a spin-off anime and merchandise, but a global brand that maximised profits from all major revenue streams.
The major side effect of this move was that the games no longer became the main product, but a promotional tool for new Pokemon and new battling gimmicks. As such, the expectation was that they were to be released on a regular schedule. The average length of a generation became shorter and multiple generations would debut on the same console instead of there being a new generation per console.
Basically, the production of XY was rushed, and its existence was mandated so that the 3DS could have a Pokemon game on it as soon as possible. While this was happening, there was already an expectation that yet another generation would debut in 2016 for the 20th anniversary. So XY was cobbled together in a hurry just so that we had mainline games on the 3DS before then.