If you leave eggs in a neighbor's basket, 100 eggs are deducted from your total and you get 50 back of the opposite color.
When neighbors leave eggs in your town, it does not subtract from your egg total - you end up with 400 eggs and lose none.
So basically, a basket generates 200 'free' eggs for someone. 400 eggs are required to fill a basket and the payout is 600 eggs split between the owner of the basket and the neighbors who donated to it.