From a storytelling standpoint, keeping the chronology of these films as close as possible helps ramp up the stakes for The Avengers: Infinity War.
In the same vein, Thor: Ragnarok tells a story that can unite Thor with The Hulk, but it also creates specific conditions that can keep them away from Earth while also setting up a massive game-changer for the Marvel Cinematic Universe in 2018.
Kevin Feige has stated that the reason the Marvel Studios creative team adapted Captain America: Civil War at the beginning of Phase Three was so they could disassemble The Avengers before The Mad Titan shows up with his Infinity Gauntlet.
From there, origin movies like Doctor Strange, Spider-Man: Homecoming, and (eventually) Black Panther put their respective heroes on the board while also keeping them away from the main Avengers roster.