Why would a journal accept my previous paper for publication, but reject latest manuscript due to being "outside of the journal's scope?" I submitted a manuscript last year to an IEEE journal, and the paper was accepted for publication. I recently submitted a new manuscript to the same journal, but, this time, the paper was rejected, and I was told that I should submit to another journal since my paper was not within the journal's scope. The two papers both target similar applications. Furthermore, the second paper uses some work in the first paper, making substantial improvements at solving a much more difficult problem. Based on the reviewer's comments (and my own personal assessment), I do not believe that the work presented in the second paper was "incremental" in nature. Far from it. Two of the three reviewers gave positive reviews. The third reviewer, however, mentioned the "outside of journal's scope" issue and the associate editor and editor-in-chief both sided with the 3rd reviewer, and the paper was stopped dead in its tracks.

I'm scratching my head trying to come to terms with how in the world my first paper could be accepted by this journal, but the second paper focused on the same application space and achieving substantial improvements on a much more difficult problem (backed up with measured results) could be rejected. Any ideas?
Four ideas: 


It was really out of scope last time, but they either


didn't notice and mistakenly accepted it, or
didn't have enough in-scope papers to fill the issue, so they accepted yours even though it was slightly out of scope.

They made a mistake and your new paper is actually in-scope. However, you won't win any friends or improve your chances by trying to convince them of this. 
The journal has changed scope slightly in the last year, or is trying to change scope slightly now, or different editors have different ideas of what the scope is (as suggested by NateEldredge)
There was some small detail about the first paper that made it in-scope which the second paper lacks, which we couldn't possibly identify for you.