During many years as a publisher I've rejected books because they were similar to books that had just flopped, and I didn't want to risk losing more money with another book like it.
I've declined books on the grounds that my acquisition budget is fully allocated for the foreseeable future (which meant that we'd run out of money and couldn't pay any more advances or print bills for a time).
I've said no to writers because despite my personal interest in the book others in the company have persuaded me not to publish it.
I've had to reject authors who are quite clearly mad and unprofessional in their approach and who would be too much effort to deal with.
Sometimes the rejections have been because we had already decided to produce a similar book either in-house or using our existing author contacts.
Or it could be that I'd decided on a change of direction and was no longer interested in commissioning new titles in a particular genre which I felt wasn't right for my company.
I'm sure there are editors out there who have rejected books simply because they're having a bad day and want to take it out on someone.
And don't forget, of course, that most books are rejected because they are simply not good enough to publish.