A 404 Page Not Found error occurs when the production library doesn't have any rules, elements, or tools published to it. The staging library would not show an error, because it is written when the rule is saved. There could be a rule that is saved and working on staging, and the production environment shows an error because the rule hasn't been published. No code is published to the production environment until someone explicitly clicks Publish. If no rules or tools have been published, then an error occurs on the production library. Once the production library is published, the error no longer persists.