He's just so misunderstood...
Yup. Apparently when test audiences saw the full cut of the movie, they were confused about Loki's role. While he was there to set up Ragnarok, apparently viewers thought that he was somehow controlling Ultron. (Via).
“...Basically Kevin [Feige] said that in test screenings, audiences had overemphasized Loki’s role. They thought that because I was in it, I was controlling Ultron and that it was actually imbalancing people’s expectations. So Joss and Kevin were like, ‘Let’s cut it because it’s confusing people.’”
"In a parallel universe... that's a great film!"
"But it's not the film they made."