How naive. He writes writes a good deal of law (well, not personally, it's written by the people who work for him). Not all law is legislation, and considering how incompetent the legislature has been lately, there's a lot left to fill in.
Maybe ideally laws are only written by congress, but they have ceded quite a lot of that power to the executive branch over the years. Should they want to, they can take it back, and they sometimes but, but they have given the executive powers to determine what the law is. Obama still has to work within the confines Congress sets up, of course, but a lot of the "laws" they pass amount to "let the executive figure out what the actual law should be, following these guidelines".
A good example here is Drug Classifications. Congress set up the framework, and leaves it to the executive to handle the details. Sometimes they will come in and override the executive, but the executive has quite a lot of power to determine what the actual law is thanks to the concept of delegated legislation.
The other example, as is seen here, is through executive "memos" and "orders". "executive orders have the full force of law when they take authority from a power granted directly to the Executive by the Constitution, or are made in pursuance of certain Acts of Congress that explicitly delegate to the President some degree of discretionary power " - http://en.wikipedia.org/wiki/Executive_order
Also, wtf do secret laws have to do with secret debate?