Because, at first, FIFA did not want the Olympics to rival the World Cup, so a compromise was struck that allowed teams from Africa, Asia, Oceania, North America, Central America and the Caribbean to field their strongest professional sides, while only allowing UEFA and CONMEBOL teams to pick players who had not previously played in a World Cup. Many teams therefore fielded very young teams, including France, who won the 1984 Olympic title in between two semi-final appearances at World Cups.
Then, an idea of youth teams found favour at both FIFA and the IOC, and since 1992 players must be under 23 years of age, with three over-23 players allowed per squad. The tournament is now effectively an "Under-23 World Cup", complementing FIFA's own tournaments at Under-20 and Under-17 levels. The new format allows teams from around the world to compete equally, and African and Asian countries have taken particular advantage of this, with Nigeria and Cameroon winning in 1996 and 2000 respectively.
I hope this helps....