If you grow the same crop in the same place every year, its pests and diseases will increase rapidly in number and often will become a serious problem. If you move that crop from its first place somewhere else in the garden then the specific pests and diseases of that crop will gradually die out from that place in the absence of their host. Various types of potato and tomato eelworm, clubroot which attacks almost all brassicas and onion white rot are some of the common garden problems that may be alleviated by crop rotation system.
There are also other benefits from rotating vegetables. Some crops, like potato, blanket the soil so well that they smother most weeds from the soil where they were grown. Using the crop rotation system, it is useful to follow them with crops that are difficult to weed, such as onions. Also, most root vegetables, and especially potatoes, help break up the ground and keep the soil structure open and well aerated.
Most vegetables in the legume family, including peas and beans, fix nitrogen in the soil where they are grown by means of nodules on their roots and then make it available for the next crop. This way you can use that place for the next crops, growing vegetables that are nitrogen-hungry crops, like leafy brassicas, potatoes or spinach. After harvesting your nitrogen-hungry crops you should grow root crops which have a relatively low nitrogen requirement.
There are some vegetables that do not fall into a principal rotation group. Perennial vegetables and many salad plants are some of these. Salads stay in the ground for a short period of time and they can be use for intercropping or to fill temporary gaps in vegetable beds. Still, they should not be grown in the same patch of ground year after year. Perennial vegetables are best grown in a permanent bed of their own and so they are not rotated.