How did the factories and such motivate people to work and how were people's inputs compensated, if by definition (at least in theory) every employee got the same salary?
Money is a tricky subject for historians of the Soviet Union. On one hand, both the inefficient command economy and the ideological principles of the state seemingly rendered money less important for daily life. Having a mass of Rubles in one's pocket meant less when there were fewer luxuries to buy and too much cash could be a liability. Conversely, there is abundant evidence that money did matter to the masses. Government-sponsored lotteries were increasingly common and popular in the postwar period and offered cash prizes as well as other material goods. Goods, even if scarce, still needed to be paid with cash and workers did see their wages as their rightful compensation. These two competing ideas- that money mattered and it did not- are not as contradictory as it might appear and was one of the defining hallmarks of the Soviet labor economy.
First off, it bears mentioning that working conditions and labor compensation did vary considerably throughout the USSR's history. What a worker's salary meant and could buy could be very different in 1926, 1936, 1956, 1976, and 1986. But generally speaking, the Soviet state implemented systems of wage controls that were designed to level out wages between occupational sectors. Lenin in State and Revolution held that officials and managers should not receive wages higher than that of ordinary proletarians and that the latter's salaries would correspondingly rise to that of their former superiors. Various Soviet governments sought to put this schema into practice and found that leveling was more easily proclaimed than achieved. Stalinist industrialization increasingly relied on a wage scale that favored skilled workers as an incentive for better labor outputs, even if better wages did not translate into better purchasing power. The wage reforms of the postwar periods all sought to remedy problems like discrepancies in salaries that in theory should not have existed according to Soviet ideology. This hobbled reform efforts because on some level, the state could not be completely honest about the problems it created.
But if the state faced the embarrassment of a class structure despite its policies on salaries, Soviet workers still had to make ends meet. The state-run enterprises did offer bonuses for achieving or exceeding production quotas. These bonuses became one of the central features of the Soviet economy. The Khrushchev period did seek to decouple bonuses from plan fulfillment and broaden the criterion for what characterized a successful execution of the economic plan. But while the Thaw reforms made some headway, they were never entirely successful. Soviet managers often received bonus incentives for over-fulfillment which they could then redistribute among their workforce. Over-fulfillment and bonuses often became self-reinforcing trends as Soviet managers often used Tolchak (fixers) to acquire various resources to meet the plan when the allotted materials could not do the job. These grey-market fixers operated in a nebulous place within the planned economy and could be the difference between failure and success for a manger.
Soviet managers also used their own official and grey-market resources to compensate their workforce. On their own, the set Soviet wages had relatively little purchasing power. However, one of the key facets of the Soviet economy was not the price of things, but rather access to them. Workers had the option of buying goods and services in enterprises' own canteens. This was a massive incentive during the dearth of the Stalin period when basics like food were in short supply. The Stalinist-era factory canteens and cafeterias were very much an anomaly within the planned economy in that they were run like a market economy. The Stakhanovite movement of the 1930s was another example of non-monetary compensation in which workers who over-produced were singled out as exemplars for their coworkers to follow. While Stakhanovites were sometimes poorly regarded by their compatriots, there is evidence that some Stakhanovites were false fronts by Soviet managers to squeeze more resources out of the planned economy and redistribute them among the work-force.
Non-monetary incentives emerged by the 1930s as one of the key levers of compensation. The return to normality after Stalinism and the war in the 1950s led to an increase in travel for Soviet citizens. Factories and other state concerns were one of the major sponsors for Soviet tourism groups. The shortages in housing also played a role in keeping the workforce in check as workers with a good relationship with their superiors could gain a powerful patron to cut through the endemic bureaucracy of an over-planned and inefficient system. Work places also sponsored various hobby clubs and other leisure activities that could wring more resources from the state than those organized by individual citizens. Many Soviet football clubs had factories as their sponsors as did other sports. Factories also organized leisure events like concerts or professional wrestling tournaments.
Workers of course had other reasons for showing up for work than a chance to see a wrestling match. The Soviet state looked very askance at work-shy behavior as a sign of deviance, and while penalties became more humane after Stalin, chronic lateness or absences could bring a worker unwelcome attention. But the presence of the Tolchak underscored that there were many corners of the Soviet economy in which officialdom was absent or turned a blind eye. Pilfering materials from the workplace could be dangerous, but they also could mitigate against the chronic shortages within the consumer economy. But arguably more important than the physical capital gained from employment, Soviet workers found that the social capital to be more vital for daily existence. Working within an enterprise brought one into contact with people that could ease the burden of daily life. Blat (roughly translating to "sway") was a major factor in one's social standing. A Blatmeister was a person who despite their official workplace title, was someone who could accomplish things that going through regular channels could not. While some blat exchanges resembled organized crime, others were more akin to good friendships or other social relations. The state was never at ease with blat exchanges, but could never eliminate them.
So money was not the only form of compensation Soviet workers received from showing up and punching their time cards. Wages both mattered and they did not within the Soviet system. On their own, a Soviet wage bought very little for the Soviet worker. But when wages were connected up to these semi-legal and unofficial factory cultures, they meant a great more. Soviet managers were not just bureaucrats in charge of the sundry details of labor, but found that to meet targets they had to act in a manner akin to a Gilded Age American political boss of a major city. Soviet workers also knew how to game the system to achieve something that their wages on their own could not buy. This could be being a good worker, but could also mean that they were a good "friend" for people to know. All of this contributed to the infamous inefficiency of the Soviet economy. But these unofficial networks and incentives did provide something of a more comfortable existence for Soviet workers that made it much harder for the state to eliminate.
Sources
Eaton, Katherine Bliss. Daily Life in the Soviet Union. Westport: Greenwood Press, 2004.
Kotkin, Stephen. Magnetic Mountain: Stalinism As a Civilization. Berkeley, Calif: University of California Press, 2002.
Ledeneva, Alena V. Russia's Economy of Favours: Blat, Networking, and Informal Exchange. Cambridge, UK: Cambridge University Press, 1998.
Nove, Alec. An Economic History of the USSR. Harmondsworth, Eng: Penguin Books, 1992.