"The Congress shall have Power ... [long list of various government functions and agencies] ... To make all Laws which shall be necessary and proper for carrying into Execution the foregoing Powers, and all other Powers vested by this Constitution in the Government of the United States, or in any Department or Officer thereof" - Article 1, §8, United States Constitution.
In practice, government agencies are primarily required to adhere to U.S. Code (list of laws compiled from bills passed in Congress). Then they consider executive orders.
Your mental model of the executive branch is a commonly held one. However, you should adjust your model to incorporate this information which may have been omitted from your initial training data set.