How did canned food help during world war 2?

Canned food was used in the K Rations and the rations of the UK forces world wide. This allowed the troops to get protein, fruit, vegetables that were not dried and blah. However, most troops hated the Spam ham and even wrote back home to their families not to send spam. Some of the poor navy boys got spam for one straight month, particularly on the submarines.