It does function in the rotation and stabilization of the foot, but that is not why we have it, even species in which it serves no function still have it. A bone does not necessarily have to have a purpose in an organism, instead it can have on in its ancestors.
We have this arrangement becasue we inherited the basic limb bone arrangement from our fishy ancestors. Basically all tetrapods share the same pattern of bones in their limbs, one bone, two bones, many small bones, followed by several groups of long thing bones. this goes for front and hind limbs.