But it was also bound up with ideological and ethnic campaigns against e.g. Ukrainian nationalists and the Ukrainian peasantry generally. Stalin was a big fan of collective punishment, repopulation, depopulation, etc. Sociopath. Resistance of aspects of the peasantry to collectivization, etc. became an excuse for brutal policies, independent of any theoretical "socialist" policy.
Remember Marx (and even Lenin) wrote nothing about e.g. agricultural policy or even what socialization of industry would look like in practice. So these people (Stalin and his apparatus) were making it up as they went along, and they were awful people.
e.g. Stalin came to power against Trotsky and the Left Opposition by insisting on maintaining the NEP and taking a more gradual and pragmatic approach and then turned around, exterminated his opponents, and did the precisely the opposite and forced mass collectivization (leading to mass starvation.)