Why do onions need to be refrigerated after cutting? Wouldn't it be just as well to put the onion in a container or baggy and put it back in the pantry? And does an opened container of ketchup need to be refrigerated?
You refrigerate a cut onion for several reasons. One is that cutting into anything introduces bacteria, which will grow more quickly and cause spoilage faster at room temperature.
When you cut the onion, you also rupture the cells, which leak moisture and cause spoilage. Again, that happens faster at room temperature.