The AI regularly puts a fort on resources near borders. What is the benefit?

Actually, I think you're missing the point and doing the same thing the idiotic AI does... waste time and effort... just because the AI does it doesn't make it a sound strategy.You guys are missing the point about forts...
This only applies if you're going to have your own troops standing around twiddling thumbs in the fort... an empty fort does nothing for you other then what an improvement would do... give you access to the resource for building or trading purposes. Forts do nothing for counter-espionage... only spies and counter-intelligence agencies (or dumb luck) make it harder. If you're really worried about sabotage, stick a spy on the resource, not a fort.Forts are harder to bomb. They are harder to pillage with spies. They are harder to capture (generally) with units.
I could say the exact same thing about a fort.If you aren't going to gain any food/production/commerce bonus... then there is no point in having the appropriate improvement.
If you don't have better things for your workers to do then build useless monuments to man's stupidity (fixed fortifications), then you've already wasted your time and resources building too many workers in the first place. The only purpose to building a fort (which takes a lot longer to build then an improvement which ALSO collects the resource just the same for a shorter investment) is so that you can assign some soldiers to the fort to stand around and twiddle their thumbs to protect something you shouldn't be letting the AI do in the first place, get inside your empire to your resources... if those soldiers were on the front line instead of inside your empire guarding some stone walls in a tower, then maybe the enemy wouldn't be marauding your resources.Now... the only reason you should build an improvement outside a BFC is if you are low on workers, and need to squeeze every last worker turn out of your poor workers. Otherwise, Forts are superior in every aspect to regular improvements. Live with it.
Well, if you plan on slapping down a city near those resources, then you aren't wasting time, you're preparing.
Forts:
1) They do not defend without a unit.
2) Military units get a defense bonus akin to that of a city plus whatever terrain bonuses and fortify bonuses.
You are right that it isn't happening in any city's BFC, but it is definitely happening outside. I would disagree that it doesn't matter, since it is really annoying to improve plots that will feed a new city, to have the AI go and replace the farm/mine/well/whatever with a fort, and then you have to grab some workers to re-improve the plots.Silbeg, I never noticed that happening and I use Automated workers a lot (huge maps, domination vics). If it does happen, then the developed resource was outside of any city's BFC so it didn't matter anyway. I've never seen a worked resource within the city BFC to be changed to a fort even when allowing workers to override improvements. That sounds like either a bug or a freak occurrence.
Actually, I think you're missing the point and doing the same thing the idiotic AI does... waste time and effort... just because the AI does it doesn't make it a sound strategy.
This only applies if you're going to have your own troops standing around twiddling thumbs in the fort... an empty fort does nothing for you other then what an improvement would do... give you access to the resource for building or trading purposes. Forts do nothing for counter-espionage... only spies and counter-intelligence agencies (or dumb luck) make it harder. If you're really worried about sabotage, stick a spy on the resource, not a fort.
I could say the exact same thing about a fort.
If you don't have better things for your workers to do then build useless monuments to man's stupidity (fixed fortifications), then you've already wasted your time and resources building too many workers in the first place. The only purpose to building a fort (which takes a lot longer to build then an improvement which ALSO collects the resource just the same for a shorter investment) is so that you can assign some soldiers to the fort to stand around and twiddle their thumbs to protect something you shouldn't be letting the AI do in the first place, get inside your empire to your resources... if those soldiers were on the front line instead of inside your empire guarding some stone walls in a tower, then maybe the enemy wouldn't be marauding your resources.
Forts in-and-of-themselves are re-active, as opposed to pro-active, and anyone who builds them on a resource outside a BFC that isn't actually part of a defensive line on the border of your empire has just wasted time, effort, resources and is preparing themselves for further mis-use of their troops... live with it!