My memory is a little blurry, but I remember a few things:
1. She does seem to be pretty abandoned by her family and all and 'convinces' him that she'll help take the Xue family down. On the emperor's part, considering that he and Xie Wei had contrived a whole set of plans predicting her/Xue family's moves, might've just wanted to keep his enemies close OR genuinely believed her plan.
2. Takes down any chance of the Xue family moving up in the future. The emperor seems sickly and close to death, which means Lin Zi Wang (if that's his name) will take over. If Xue Shu sleeps with the emperor, she can no longer be Lin Zi Wang's consort and therefore loses long-term control of the harem and political power. Emperor knows this.
3. He's a man. Even if he's not promiscuous... sometimes human nature has its whims, and considering his harem FULL of concubines, I wouldn't put it past him.
4. Simple plot hole which I could honestly see happening.