That is very sad to hear. That must have been horrible for you to find, having been feeding the hog all Winter.
It isn’t really possible to say for sure why it died. In normal times I would suggest that you report it: https://www.hedgehogstreet.org/garden-wildlife-health-gwh/ and possibly get it tested, but I don’t know whether that will be operating normally at this time and it may have been too late anyway.
What springs immediately to mind as a suspicion is that the hog may have eaten some rat poison which may have been meant for the rat. It sounds a bit horrid, but did you see any blood in the mouth or rear area of the hog. Rat bait thins the blood and causes internal bleeding so that a rat which has been poisoned with often show those signs. Although, if there is a possibility that it died 2 weeks ago, those signs may not be easily visible. It may be something which you don’t really want to explore, but if you do, don’t touch either the hog or rat but wear gloves and try to move them with something else (possibly newspaper, or similar, or a shovel or trowel) so that you don’t actually touch them, in case they have been poisoned.
But it does illustrate how important it is if anyone uses rat bait that they take steps to ensure that a hog cannot access it. It is a requirement by law to take those steps, either when trying to trap a rat or use poison. The following is an extract from BHPS:
Hedgehogs are protected, in England, Scotland and Wales, under the Wildlife and Countryside Act 1981, Schedule 6 and in Northern Ireland under the Wildlife (NI) Order 1985, Schedules 6&7. What this means is they are
“protected from being killed or taken by certain methods under Section 11(1) of the Wildlife and Countryside Act 1981. The methods listed are: self-locking snares, bows, crossbows, explosives (other than ammunition for a firearm), or live decoys. The species listed are also protected from the following activities: trap, snare or net, electrical device for killing or stunning, poisonous, poisoned or stupefying substances or any other gas or smoke, automatic or semi-automatic weapon, device for illuminating a target or sighting device for night shooting, artificial light, mirror or other dazzling device, sound recording, and mechanically propelled vehicle in immediate pursuit.”}
It’s the responsibility of anyone setting a trap, laying bait, etc. to take suitable precautions that they do not kill a hedgehog. They also need to be aware that hogs can be good climbers and squeeze through surprisingly small spaces.
It might be useful to know that information so that you can pass it on to anyone you hear of who uses rat bait or rat traps.
Although, of course, we need to bear in mind that it may not have been rat bait that killed the hog in this case, even if it does sound a bit suspicious.
Don’t forget to enter the poor hog on the Big Hedgehog Map. It might help other hogs in some way but it is also a way of making sure that the hog’s existence and death is registered and counted.
I hope you have better luck with any other hogs which might visit your garden.