The first episode of Tokyo Ghoul √A aired today, and at the end (obvious spoiler), Kaneki went with Aogiri (we don't know why yet). However, I read that in the manga, he did the exact opposite. Instead, he tried to create a group to fight Aogiri. Why did the second season completely deviate from the manga? Was it by the choice of the mangaka or the anime producers?
It's inaccurate to say it completely deviated from the manga. I read the manga first until the end as Tokyo Ghoul aired. Spoilers ahead.
The season 2 would seem to deviate from the manga because of the "main difference" people constantly point out: Kaneki joined Aogiri in the anime while he created his own group in the manga.
There are two points to note here.
First: Kaneki, both in the manga and anime, looked for the same thing: the strength to protect his comrades.
In the manga, we later found out he did this through character development and explicitly stating this. In the anime, it was only explicitly stated why he joined Aogiri. It would always be better when in accompaniment with other developments to support this rather than plainly stating it. The anime riddled itself with Kaneki's identity; the manga thoroughly went through his identity mixed with progression of the story.
Second: This makes most sense when taking into account the impressive and risky compression of over 100 chapters into around 20 episodes.
You will notice differences in the manga and anime, but they always ended up with the same conclusion. The anime makes impressive compression, most especially in the first season, then it started crumbling and destroyed itself by the end of the second season. The anime made thorough emphasis on different things, like Rize's appearance and later crucial catalyst to Kaneki's power & identity. The manga, most of the time, would contribute at a normal pace to the story development and the CCG's side.
In spite of all that, Tokyo Ghoul always wound up with the same conclusion and same point. Fights are compressed to one scene; multiple events occurring at different times are made into one event.
In conclusion, it never mattered at all if Kaneki would join Aogiri (anime-only) or form his own group (manga). This may be my only speculation, but this was a nice move by the director, writer, producer, or anyone who handled it because this meant the manga followers/fans would be baited to watch the second season if there were any developments that would lead to a different ending when it was as close as the manga, except:
showing Hide flat-out dead in the anime.
I, myself, was caught with the hype after reading the manga with the sudden turn of events at the end of the first season, even though I expected they would use the same formula (minor changes and compression of events to make the same conclusion as in the manga).
Well it's a bit simple because it's a bit like books turned into films and have always a different ending. Possibly,the director of the anime wanted to show the audience how it would be like if kaneki turned to Aogiri. It is possible doe that the director just didn't want to copy the manga because sometimes it does happen when directors want to put there own ideas into it rather than copying the actual thing.
Because season 1 was changed rather dramatically from what it should have been, so when the author (who is on record stating how disappointed they were with the adaptation) took over creative control of writing for the 2nd season, they decided to write it as an original story and try to fix the mess somewhat, so when/if there's a TG:Re anime, manga and anime fans alike will be able to pick it up immediately without having to check the other's material.