you might write a lot of game files, you can specify in cocos2d.js file, which is much easier to write your own
game file (??? kb) + engine file (200kb)\ +\ box2d\ ,\ which\ is\ pretty\ big\ to\ download\ over\ the\ internet.
your\ web\ page\ will\ lockup\ downloading\ the\ js\ files,\ which\ is\ bad\ for\ user\ experience.
by\ having\ cocos2d.js\ which\ is1-2kb, you wont add too much weight to page loading. and when page loading is done, it then begins downloading the game.