The GOT producers explained here why they ventured away from the book plot line.
Sansa is a character we care about almost more than any other, and
the Stark sisters have from the very beginning been two characters who
have fascinated us the most,” said showrunner David Benioff. “We got
very lucky in casting because it’s so hard to cast good kids. Even if
they come in and do a great audition, it’s so hard to know if they’re
going to quite literally grow into the parts. With Sansa and Arya in
particular, their storylines have become quite dark. It was such a
gamble and the fact that they’ve both become such great wonderful
actresses is a bit of a miracle.
And goes on to explain why they deviated from the book plot further due the fact that they wanted her to have a bigger part and if they stuck with the books, she would still be at the Vale and does not get much book time. Also Ramsay would have been married to a insignificant person, as you stated.
We really wanted Sansa to play a major part this season,” Benioff
said. “If we were going to stay absolutely faithful to the book, it
was going to be very hard to do that. There was as subplot we loved
from the books, but it used a character that’s not in the show.
So from a TV show point, my thoughts are that Littlefinger was trying to gain more power by marring Sansa to Ramsey to solidify his position in the north being that the Bolton's are the second strongest family in the North and with the backing of the Vale he would certainly think he was doing the right thing. But as stated below, it seems he did not realize that Ramsay was cruel and that his plan may actually backfire.
Littlefinger, arranged for the long-suffering teen to wed the
ex-bastard of Bolton, whose family controls her former home of
Winterfell. (Littlefinger, it seems, is not aware of Ramsay’s cruelty.)