what I meant was if you have a layer and bunch of tables in a mapservice, you can join any of those tables to the layer on-the-fly and draw features based on attribute value from the joined table. Also, please note that a layer or table can be directly accessed from a workspace (don't need to add them in the map at the authoring time) as long as the workspace is 'registered' to the mapservice.
The sample that you've provided shows an example on how you can take advantage of ArcGIS server side functionality to generate class breaks renderer without writing much code on the client side.