Seems that what is written in this section is not what we get. I've used what was generated from a workspace with 2 apps and with a similar command(see below in code tags), just removed src "common/src" and the sources for pages are in "app" folder not in "src"
The result is :
- page1/all-classes -> app1 code with Ext singleton and some core/foundation code // should be without
- page2/all-classes -> app2 code with Ext singleton and some core/foundation code // should be without
- common.js -> all Ext code without <Ext singleton and some core/foundation code> // should be with
- page1&2/index.html -> include order is: common.js then all-classes ; correct but with issues above is thrown the error that Ext is undefined, as is defined in all-classes.

Code:
sencha compile -classpath=ext/src,page1/app,page2/app \    
page -name=page1 -in page1/index.php -out build/page1/index.php \         
    -scripts ../common.js and \    
page -name=page2 -in page2/index.php -out build/page2/index.php \         
    -scripts ../common.js and \    
union-set page1,page2 and \    
exclude -not-namespace Ext and \    
save common and \    
concat build/common.js and \    
restore page1 and \    
exclude -set common and \    
concat build/page1/all-classes.js and \   
 restore page2 and \    
exclude -set common and \    
concat build/page2/all-classes.js
As I understood from docs the above command should compile all Ext code(union) that is used for both pages apps in common.js file and only app(without Ext namespace) code for each page apps in app-classes.js.

EDIT: used Sencha Cmd v3.0.0.250