Potatoes and onions may taste great together in hash browns. But when it comes storing them raw, youneed to keep them well apart. The reason, as the food safety experts at Penn State University point out, is that onions and potatoes can release moisture and gases that will cause the other to spoil faster.
I copy and pasted this answer because I didnt know myself. Hope it helps. ;)