Refrigerate after opening, but why?
The canning process makes food safe: existing bacteria and fungi are killed, the intrusion of new pathogens is prevented by sealing the container. (More e.g. here.)

As soon as you open the can or jar, its contents are exposed to the surrounding air which will contain bacteria and fungal spores. Some of those will happily grow feeding on the food they land on. Refrigerating slows down their metabolism, meaning they can't reach dangerous numbers within the recommended storage time after opening. For more info on storing food, see our canonical posts on food storage and on how long quickly-spoiling food can be left at room temperature.