When it comes to metaphorical egg transportation, it is indeed advisable not to put all your eggs in one basket. For one thing, you may only have a finite amount of "eggs" to lose, and that "basket" may not be the sturdiest or most stable in the wagon. The expression "Don't put all your eggs in one basket" generally means not to risk losing everything by pinning all of your hopes or future goals on one and only one option.
The danger of keeping your eggs together should be obvious once the basket falls off the wagon or experiences some other unfortunate fate. Wherever the basket goes, the eggs must surely follow. In a metaphorical sense, investing all of one's time, energy, attention or money in a single endeavor can be a similar recipe for personal disappointment or even tragedy.
While a personal investment in a future goal is a laudable idea, few people can afford to take such a risk without some sort of safety net or fall back plan. College students who dedicate themselves to following a creative arts major, for example, are often encouraged to select a more secure minor in case they are not immediately successful in the professional world. Pinning all of your hopes on an extremely competitive career path would be the equivalent of putting all your eggs in one basket.
Another interpretation of this expression is often seen in the world of investing. Potential investors are encouraged to diversify their investments rather than put all of their money into a single, and possibly volatile, investment option. It is never advisable to put all your eggs in one basket when it comes to financial markets. Investors should have some money put aside in more stable funds in order to survive any sudden downturns in more volatile markets.
There are several stories concerning the origin of the expression, but it may have been inspired by the real life experiences of poultry farmers who used wagons and baskets to take their eggs to market. If all of a farmer's eggs were placed in one basket, it would only take one unfortunate accident along the way to ruin his entire investment. By not putting your eggs all in one basket, you reduce the risk of having nothing to offer at the market.