炮制 originated as a
中药 (Chinese medicine) term:
炮 means 'to roast',
制 'to process' — the prep work of roasting, frying, soaking, or steaming raw herbs to make them safe and effective. The set phrase
如法炮制 ('do it by the same recipe') generalized the meaning to 'fabricate / produce / cook up', often with negative undertones — fake news, plagiarized articles, or knockoff products.