That piece inserted in the top of an aerosol can is a one-way valve, kind of like a little plunger. The pressure inside the can keeps it closed (presses up on the sealing flange), and when you push down on the nozzle it pushed the flange down, creating a small opening that allowes the pressure to expel the contents in a controlled fashion.
Removing the valve with the contents still pressurized is going to release all the pressure and contents at once and render the can completely unusable. It may also be dangerous, depending on how much propellant is still in the can.