Ideally, framework code originates from some existing, working product, from which it was factored out because it happened to be useful.
Contrast this with frameworks that are created for the framework's own sake, hoping to attract its first application developers.