Dorne is neccessary in order to get Jaime out of King's Landing for Cersei's story line. Honestly, there's no other reason for it. The reason why they have scenes there is because Nikolaj Coster-Waldau is one of the main actors on the show and they can't just cut him out for an entire season like they did with Bran.