There are several good reasons here: "chaining" is the main disk, the ability to write very short code by chain should not throw any errors in order to work without visible problems, for example:
$("#divMenuContainer:visible").hide("explode").add("#another").fadeIn();
Each object in the chain, even if it refers to any DOM elements, can be added later or let it take another example:
$("#divMenuContainer:visible").live("click", function() { ... });
In this case, we do not care about any of the elements found by the selector, we care about the selector itself. Here is another:
$("#divMenuContainer:visible").find(".child").hide("explode").end().fadeOut();
Even if there are no children, we may want to return to the chain again, continuing to use the .prevObject link to return to the chain.
There are dozens of different cases like this that show the benefits of the library as it is. As to why, from an interview with John Resig , who is the creator of jQuery, he claims that it was. It was after the code was as brief as it could get, and the chain model is what came out of the hat, it just has a lot of advantages, the example above is just a few of them.
To be clear, I am not saying that each attribute of the chain is good, there are only many supporters.
Take this page as an example, that if we had something like this:
$(".comment").click(replyToFunction);
Should this fail because there are no comments yet? Well no, in fact, this was not expected, I would not want an error here ... if this element exists, if it is not. I believe that, at least in my experience, not throwing an error due to a missing element is extremely useful than throwing it.
The selector in your question, the #ID selector is a special case when you expect only one element, so maybe you could argue that this should fail ... but then this is not consistent with the other selectors, and you want so that the library is consistent.
With almost any other selector, you expect 0-many elements, so crashing when you don't find any elements will be significantly less desirable in most situations, especially in cases like .live() above.