This reminds me of the first week in Culinary Arts class. Some kid accidentally used baking soda instead of sugar and the chef said that it was the most disgusting thing he had ever eaten.
Please - either you decide to accept literal translation, even though it is not a common sentence in the target language, or you only accept sentences that are correct and common in the target language. But you can't say it's wrong, although the meaning is correct. An English speaker would rather say 'Your cake is without sugar', than 'Your cake does not have sugar'. But still you mark it wrong. In other cases, you mark literal translations wrong, because its not common in the target language. That is literally confusing and hindering.
Italian is not a code for English, so you can't say "Italian uses XXX everywhere that English uses YYY".
ho is used for "I have", but you can't use it for "we have" or "he does not have" or "she wants to have", for example. It's specifically the form for "I".
ha is the form for "he, she" (and things that would be "it" in English) and for singular nouns such as "your cake", which is why it's the version used here.
To make a negative sentence, English needs to use a form of the verb "do" in almost all cases, which is why we say "Your cake does not have sugar" rather than "Your cake has not sugar".
But Italian does not need this helping verb "do". They just say the equivalent of "The your cake not has sugar." And so you need the form of the verb that corresponds to "the your cake = she" (since "cake" is grammatically feminine in Italian), which has ha.