According to Google:
> This add-on instructs the Google Analytics JavaScript (ga.js, analytics.js, and dc.js) running on websites to prohibit their information from being used by Google Analytics. Using the Google Analytics opt-out plug-in will not prevent site owners from using other tools to measure site analytics.
https://support.google.com/analytics/answer/181881?hl=en
I've heard that the reason it sets a variable rather than blocking the script is to avoid breaking websites that do custom tracking.