You can refrigerate ketchup once opened to keep the ketchup fresher longer.
But ketchup does not require refrigeration once opened and you can safely leave the ketchup out in the pantry or on the counter, table etc at room temperature without any issues.
I never have refrigerated opened ketchup and have sometimes had ketchup for as long as 4 months without ever refrigerating the ketchup.
So you can refrigerate the ketchup to keep it from losing it's freshness but the ketchup will not spoil if left out of the refrigerator.
I save the room in my refrigerator for things that really need refrigerated.
Unopened ketchup should easily last for a year or longer even past the use by date.
Once opened I would recommend using the ketchup within 6 months and I use ketchup a lot on things including eggs so ketchup around here doesn't usually last long before it's used up.