This is not a case of "if you do x it probably means you plan y." It is more "people who plan y almost always x." In this case, if you are going to hijack a plane, or perform a suicide bombing, you are unlikely to buy the tickets and patiently wait 6 weeks. You don't care how much it costs, since either someone else is funding it or you will never pay the credit card bill anyway.
There is quite a lot of after-the-fact investigations that hijackers and bombers buy their tickets at the last minute. This of course does not mean that people who buy their tickets at the last minute are up to no good. Most are just on their way to funerals or emergency business meetings. That's a quick enough thing to establish with a little extra searching, which is all that happens to you when you're flagged for this reason.
This has happened to me - I had a business trip Mon-Wed, and late Tues we decided we needed another day, so I changed my flight, and thus earned the SSSS. I was told it was because the ticket was "bought" at the last minute even though it was only changed. (This makes sense, our bad guys could buy a ticket for 6 weeks from now then change it to the very next day, so exemptions for changes aren't clever.)
Authorities are well aware that there are many reasons for buying tickets at the last minute, changing routes at the last minute, or taking "the long way" between A and B. Most of those reasons are innocuous. Some are not, so you get a little extra screening to make sure you're in the harmless category.