There were several episodes that showed the huge statue foot and ankle on the island. Was the origin of said foot ever explained?
The statue was of Tawaret, the Egyptian goddess of pregnancy and fertility. It was shown in flashbacks (in LaFleur and The Incident) before the Black Rock crashed into it in the 1800s (in Ab Aeterno).
Its construction is never shown, but it was revealed in a podcast that it was built by ancient Egyptians.
There's more information on the Lost wiki.
As answered by Jem above and confirmed by writers, that statue was The statue was of Tawaret, the Egyptian goddess of pregnancy and fertility. Built by ancient Egyptians.
Why did they build? Simple. The island had a bad influence on pregnant women. The Egyptians were polytheistic. It's only obvious that they would build such a statue who's like the goddess of pregnancy and fertility, to protect them from such bad influence.
P.S. - No idea if the writers did that on purpose or they just put the statue right there (given it's the popular Egyptian statue) and somehow it just happens to be explainable.