Short answer
Do ants really find the shortest path to a food source?
No! But they can find a decent path
Longer answer
Optimization algorithms are used to search through a possibility space that is too large to explore every single possibility. Such algorithms attempt to find a good enough solution, often without necessarily knowing how 'good' the found solution is to the best possible solution. So optimization algorithms don't always find the best solution. Actually, most of the time, they do not find the best path but a good enough one in a reasonable amount of time.
Same holds true for ants. In the analogy, an ant colony is an agent based algorithm where agents leave pheromone trails. The concentration of the pheromone depends upon the length of the trail. By following the trails that smells the strongest and by regularly making small errors (so that they can keep exploring other paths), they end up with a decent solution. For more info, just google How do ants find their path?.