Ukraine refused to allow communism to destroy their national identity. The communist government tried to outlaw everything Ukranian possible, including the language, and eventually decided to just outlaw the Ukranians through a combination of making the farmers grow crops that wouldn't grow in Ukraine and taking away as much machinery as possible. They were still expected to meet previous harvest quotas.
Communist fanboys will call this a "mistake in planning".
The communist plan to starve the Ukrainians to heel and make them trade their individuality for moldy sawdust bread and shoes in the wrong sizes fell somewhat apart when the rest of the country experienced a famine as well; what should have been a "shitty year for farmers" due to weather was turned into starvation crisis by mismanagement (in delicious irony, said mismanagement included "trying to starve the farmers in one of your most fertile regions by ensuring crop failures". WOOPS). The Soviets required grain shipments from the Evil Capitalist United States to bail them out.
The Communists didn't let this opportunity go to waste though. After gutting the region of infrastructure and machinery, in the middle of this famine, the Communist government decided that Ukraine was hiding food, so they proceeded to send patrols around to confiscate any food stores they could find and "collectivize" them - AKA ship them back to Moscow.
Soviet scientists had predicted poor harvests in the '32-33 years had been predicted years earlier. Knowing Stalin, it was very possible that Stalin knew about coming perfect storm and proceeded anyway. Its possible he only proceeded because a famine was predicted.
In summation, the only thing Communism is better at than Capitalism is killing communists.