Q:

Why is this Chrome extension loading twice? 

Bookmarklet is supposed to load a pop-up (bookmarklet.js) alone, instead when clicked the extension opens the bookmarklet in the current tab AND as a pop-up. 
background.html file:
<script>
chrome.browserAction.onClicked.addListener(function(tab) {
    chrome.tabs.executeScript(tab.id, {file: "bookmarklet.js"})
});
</script>

bookmarklet.js file:
var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?       k():(x?  x.createRange().text:0)),f='http://www.quora.com/board/bookmarklet',l=d.location,e=encodeURIComponent,p='?v=1&url='+e(l.href),u=f+p;try{if(!/^(.*\.)?quora[^.]*$/.test(l.host))throw(0);}catch(z){a =function(){if(!w.open(u,'_blank','toolbar=0,scrollbars=no,resizable=1,status=1,width=430,height=400'))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();}void(0o)

A:

You should set the popup html file location in the manifest.json file.  The popup file can contain the script from bookmarklet.js.  Then no more script on background.html is needed, because onClicked  will not fire if the browser action has a popup.  The popup will appear itself when the extension icon is clicked.  Or, you can as well use the setPopup() method. 
Everything described here

