I expect that most people contemplating the massacre in Paris last night are puzzled by the motive. The Islamic State can hardly expect to strengthen its grip on territory, or to expand, by provoking a militarily powerful nation to counterattack, as France almost surely will. I commend to your attention this article in the Atlantic by Graeme Wood. It's fairly long, but go ahead and read the whole thing.
He actually makes a mistake at one point by predicting that IS won't carry out attacks on foreign soil (the Charlie Hebdo attack was sponsored by al Qaeda). But the events last night actually do make sense in terms of his analysis. The most important thing we need to understand is IS adherents really do believe that they are fulfilling apocalyptic prophecies, which in fact include their near-destruction at the hands of "Rome," which today mean essentially what we all the West, the European Christendom as it has expanded to North America and elsewhere. They want to provoke conflict, in other words. Here is a key pull from Wood's essay:
In December, The New York Times published confidential comments by Major General Michael K. Nagata, the Special Operations commander for the United States in the Middle East, admitting that he had hardly begun figuring out the Islamic State’s appeal. “We have not defeated the idea,” he said. “We do not even understand the idea.” . . .So do read it. This is not an enemy that behaves according to the logic of others. Its actions make no sense in most people's terms. It is essential to understand its internal logic.
Our ignorance of the Islamic State is in some ways understandable: It is a hermit kingdom; few have gone there and returned. Baghdadi has spoken on camera only once. But his address, and the Islamic State’s countless other propaganda videos and encyclicals, are online, and the caliphate’s supporters have toiled mightily to make their project knowable. We can gather that their state rejects peace as a matter of principle; that it hungers for genocide; that its religious views make it constitutionally incapable of certain types of change, even if that change might ensure its survival; and that it considers itself a harbinger of—and headline player in—the imminent end of the world.