Why does a bruise show up on my foot if I got hit on my shin?

Gravity. A bruise is a leakage of blood under the skin. Gravity takes it "downhill". From the calf or shin, you'll see it settle in the foot and ankle area.
Gravity. It it simple. When we have an injury, we develop internal bleeding which causes a bruise in the skin. Gravity draws that internal bleeding downward. That's why it is showing up in your foot.