Sometimes, it's not that expensive. If you haven't bought (many) tiles previously (going tradition), you notice an army on it's way to your capital, moving around the borders of an expansion, and taking a narrow path between that expansion border and sea/mountain range, buying a single tile can split the army in two, leaving the AI confused as what to do next, re-running it's path-finding and taking a long path to get to your capital by another way and regroup the army, giving you time to prepare. Even if you can't block them completely, forcing them through a bottle neck will cause traffic-jam and delay them.
Of course if AI was smart enough to just DoW you and regroup inside your borders, it would be no help but when AI is in "positioning" mode, anything that prevent them from reaching their attack position will really cause them troubles
It's extremely situational and would be done better with some units to block their way, but if you were really careless not building enough and the few units you have are 15 tiles away clearing a camp for a CS, it might, with the right terrain configuration, save your day.