The immediate cause of most of the shortages is the failure of the grain harvest for the third year in a row. When the final figures are in, the 1981 crop is expected to be little more than 170 million tons, a disastrous 66 million tons short of target. Soviet buyers are in world markets for about 43 million tons, the largest grain imports ever contemplated by the Soviet Union. A Campaign to Conserve Bread

The situation in late summer looked so bleak that the Kremlin began a nationwide campaign for the conservation of bread, and there are many cities and towns where bread purchases are restricted. The crop failure also cuts into meat and milk production because of a shortage of feed grains.

On weekend days, a visitor to food shops in Moscow can see lines of buses chartered by residents of towns 50 and 100 miles away. Women wearing headscarves and felt boots fill cardboard suitcases and knapsacks with as much meat and produce as they can buy. Recently a woman buying more than what others considered her fair share snapped that she had traveled seven hours through a snowstorm.

In Moscow there is de facto rationing, limits set by store managers on the quantities that shoppers can buy, or schedules regulating the hours when residents of particular housing developments can buy. Outside the capital the rationing is often formalized, by coupon. This is a step so sensitive that it has only recently been mentioned in the press, and then only in regional papers.

In Irkutsk, a city in eastern Siberia, rationing went into effect nine months ago, with a limit of 2.2 pounds of mea t and two-thirds ofa pound of butter a month per resident. Some people reacted with outrage, plastering the wall of the regional party organization with hundreds of the red ration coupons. Many Now Prefer the New System

In Kazan, a city of a million people 450 miles east of Moscow, with an industrial complex that produces the swing-wing bomber known in the West as Backfire, visitors recently found the rations set at 1.5 pounds of meat; a similar quantity of sausage and other processed meats, and 13 ounces of butter. The restrictions have been in force for 18 months in Kazan and other cities of the Tatar Autonomous Republic, including Naberezhnye Chelny, site of the huge Kama River truck plant.

After initial protests, many residents of Irkutsk and Kazan have accepted the system as preferable to the every-man-for-himself scramble that preceded it. Lines are eliminated or reduced, apart from those for the coupons themselves.