So basically, this is the tailed beast's long drawn out story and blah blah blah. A filler.
But out of nowhere at the very end of the filler arc, Pain pleases all of his adoring fans and ends the filler by killing Utakata. He understands our frustration because he hates filler arcs as much as we do. So...he ends it!