There could be a few reasons: It may not have been cooked long enough, you sliced the cake straight out of the oven, your oven may be too hot OR have inconsistent heat. To remedy: Cook the loaf for longer. If it’s getting too brown on top, cover with aluminum foil to stop it burning. Then keep checking every 5-10 minutes with a skewer. Also ensure you allow the cake to cool down for at least 15-20 minutes before slicing.