Fox's continuity and general timeline logic is completely non-existent. I'm not talking about in terms of old and new X-Men, I'm talking about basic film-to-film logic.
Take the ending of
Apocalypse. The very ending, where the Sentinels were used for the Danger Room.
Now HOLD THE F*CK ON. The entire point of DoFP was to make sure that the Sentinels were never made. So not only does Professor X resurrect the Sentinels, knowing full well their dark possible future, but he programs them to attack mutants.
It makes no sense whatsoever, in any possible way, if you've seen DoFP. But it looks cool so that's why it's in the movie. But that's the Fox formula for X-Men: if it's cool, put it in, even if it's completely ass-backwards.