What part of the manufacturing process makes foam non-compostable?

Foam commonly used in single-use applications often contains polystyrene, which is non-biodegradable. Also, other chemical agents and surfactants can be used, and although approved for food contact through FDA, some of them may not be compostable.