Why were certain foods rationed during world war ii?

Why were certain foods rationed during world war ii?