Well, it really isn't that complicated.
For a long time, Jacob lived under the statue because why not.
But then, Horace Goodspeed from the DHARMA Initiative decided to build a cabin. And it was so sweet that Jacob decided to move there, presumably after Horace's death (could it be the reason for the Purge? was Jacob interested in real estate? speculation time!).
The cabin was surrounded by a ring of magical ash (like regular ash, except magical... isn't that all you need to know about it?) as a measure of protection against the Man in Black (of course, it's not like Jacob could be killed by his brother, but hey, maybe he had a cat and didn't feel like turning it into a Man-in-Black-proof candidate).
Chances are Ben knew where the cabin was because he used to come there with Richard (only to be told to stay outside and play in the dirt while the grown-ups are talking, as that is the Leader's Sacred Duty... understandably, Widmore was pissed about having been robbed of that and would plot his revenge for years).
But then, one day, Jacob decided to move back to the statue and aren't we glad we bothered with that cabin in the first place?
At some point during the series, Ben showed the cabin to Locke and pretended Jacob was there and invisible. See, Ben was acting like he knew a great deal about the mysteries of the island and what was going on, but he was actually pretty damn clueless and Locke kept pestering him for answers, so he decided to just come up with some nonsense in order to shut him up for a while. Only dicks would do that, but then again, only extremely gullible people would fall for it, right?
Anyway, the circle of ash had been broken (which makes no sense to me, really: a circle of ash sounds like a perfect barrier and I can't for the life of me imagine how such a thing could have happened, unless there was a windy day or the Man in Black realized he could just blow on it or use some basic tool), and the Man in Black was also there. He pulled some kind of poltergeist act with his seldom-used telekinesis and told Locke "help me". Because that's... beneficial? Well, we should just trust the guy: he's been trying to leave the island for thousands of years, so he probably had his reasons to do apparently random shit like that.
Of course, Ben went "what the f... I mean, yeeeeeah, that was just Jacob, ha ha ha!"
Then, the cabin started moving around.
Hurley stumbled upon it once, and the Man in Black was in it, both as Jack's father and as another figure that gave Hurley a good scare (yes, the Man in Black can also do that). There again, it was all part of the Plan.
Then, Locke had a dream that told him how to find the cabin (just get Horace's map and follow it! after all, how else do you find moving cabins?) in order to talk to Jacob (as said above, Jacob hadn't been using that cabin for a while, so one has to assume that was just yet another of the Man in Black's abilities... and yes, it still took two thousand years for that guy to finally manipulate a sucker into killing Jacob... poor social skills, presumably?). Of course, that wasn't Jacob but the Man in Black, still posing as Jack's father (Claire was there, too, and didn't seem to mind Aaron's absence... possibly drunk?). He told Locke to move the island, because Widmore killing everybody on the island would get in the way of his plans to kill everybody on the island.
Stuff happens, Ilana crashes on the island, sees two Lockes and realizes what's going on. She has to warn Jacob!
As she trained for this her entire life, she immediately comes up with the perfect plan: let's put the corpse of the real Locke in a box and carry it to the cabin, so that Jacob would know what his enemy looks like (because simply saying "like Locke" wouldn't be enough). "But the Man in Black can shapeshift, right?" Not once Jacob's dead, and Ilana knows that. So if you assume the worst case scenario (Jacob is already dead... oh, and the Man in Black looked like Locke when it happened... so let's say "really-quite-bad-yet-somewhat-convenient case scenario"), it makes perfect sense to carry that corpse to Jacob in order to warn him so he wouldn't get killed. I mean, killed even deader. She trained for this her entire life.
But even the best plans have flaws, and how could Ilana know that Jacob had moved back to the statue? Well, okay, Jacob could have told her. But it's not that bad: Ilana finds some tapestry depicting the statue and uses her years of training and playing Resident Evil to immediately deduce that that's where they have to go, now. Phew. Of course, one could consider the code they were using ("what lies in the shadow of the statue?" / "he who will save us all") a pretty big hint already, but nothing's quite as decisive as abandoned bits of tapestry.
And before leaving, they burn the cabin down because... I dunno, maybe they brought marshmallows.
And that's the story of the cabin. Makes sense to me!