Starting around the 1900s scientists thought they were really smart, and thought of all these ways of refining foods. Many of these food groups are vital to our wellbeing and are literally destroyed and become toxic.
It can be hard extracting all the oil out of seeds and other produce. The ideal way is to apply pressure (cold pressed). However heat is used a lot to get more oil out, not to mention reacting the oil bearing produce with caustic soda. That turns the oil to soap. Once it has been extracted the soap is turned back to oil by adding acid.
Unfortunately it has been proven that many of the health benefits of oils are lost when processed in this way. For example extra virgin olive oil lowers blood pressure while refined oil does not.