Both statute and executive order are law. In general, executive orders do not duplicate statutes. Presidents have broad discretion in how they enforce and implement statute. An executive order is the President instructing his staff (the executive branch) regarding what their priorities are, and how they should be approached.
It might be helpful to think of executive orders as akin to what business managers do with their directs on a normal basis.
Although you listed two examples (the federal anti-sanctuary and border wall laws) I only walk through one below. The idea applies pretty broadly to most executive orders.
Anti-Sanctuary Law
The 1996 federal anti-sanctuary statute(starting on page 547 here) establishes a broad set of policies for enforcing immigration law. Broadly speaking, it allows the federal government to locate, detain, and remove illegal immigrants from the United States and sets a process for doing so.
President Trump's 2017 executive order does not duplicate the statute. It also does several things:
- Directs agencies to enforce immigration law
- Directs the Secretary to hire 10,000 more immigration officers
- Directs the Secretary to create policies necessary to collect fines and fees for violating current immigration law.
- Directs executive agencies not to release federal funds to sanctuary cities.
None of these duplicate existing federal statute. Statute already gave the executive branch the ability to enforce immigration law, hire immigration officers, and assess fines and fees for violating immigration law. The executive order is merely the President's order to his staff to do these things. The last item (to withhold federal funds) is not directly mentioned in the anti-sanctuary city statute (from what I can tell), but in general federal funds can be withheld for violating federal law. Again, the executive order is just the President telling his staff how he wants things ran. It reflects his policy priorities, which is his prerogative as President.