Question: why did riley leave buffy?
Answer: When asked why they chose to have Riley leave Sunnydale, Joss Whedon says he tried to give Buffy a healthy relationship, but "people didn't want it. They did some great work together. ... Riley, by his nature, was such a good and constant character that we were at risk of things getting a little dull."