Niantic came out and apologised for the mistake they've made regarding EX Raid invites. Turns out that a bug caused the wrong invites to be sent out. In the future, more gyms will be eligible to host the EX Raid battles and more Trainers will receive invites.
Sit back down, it was a bug after all. Yesterday's slip up that caused the wrong EX Raid invites to be sent to Trainers everywhere has been identified as a bug and Niantic is now apologising.
What happened was that Niantic implemented a few changes to improve Trainer and Gym selection, but a bug hitched a ride and ended up causing the invites problem. The bug has since been resolved.
Niantic said in a statement that the "future invites will better represent how the updated invitation process is intended to function. Most importantly, Trainers will only receive an invitation if they’ve completed a Raid Battle at that Gym recently."
A couple of changes that will have an impact on the invitation process have been implemented. The first change was made to the way Gyms are selected. EX Raid Battles will still take place in parks and at sponsored locations, but the number of Gyms that meet the necessary criteria for an EX Raid Battle will increase.
In addition to these Gym tweaks, the number of Trainers invited per Gym should also rise, as a couple of changes were also made the way they are selected. These changes will give more Trainers an opportunity to take part in an EX Raid and catch Mewtwo.
Niantic added that the quality of EX Raid Battles should improve as well. This increase in quality will come thanks to the fact that Trainers with a higher level Gym Badge will now be even more likely to receive an invitation for an EX Raid Battle. Similarly, Trainers who complete more Raid Battles (at any location) the week before EX Raid Battle invitations are sent will now have a greater chance of being selected.