Why is it possible to separate NaOH from certain compounds using acetone?
Ask yourself what kind of reaction happens?
What glassware have you used to remove impurities?

By controlling pH and polarities you are able to separate compounds because of different affinities between them and solvents. You change molecular solvatation of your analyte and impurities. Then by controlling boiling point, using a rotavap, you may be able to separate two phases that are miscible. Or by making impurities insoluble you can remove by mechanical operation such as centrifugation. Such post-treatments are very common in chemistry and they scale up very well.

So, there is no chemical reaction (except acid/base reaction if any) there are physical reactions (solvatation, phase extraction, phase change: evaporation, condensation, crystallisation and sedimentation).