How identical files Sets make different Applications
Sitecore Application Roles
There are two key concepts that make the variety Applications in a Sitecore instance: Roles and configuration files. Whereas Sitecore instances used to essentially only vary by the prescence or absence of configuration files, Sitecore now includes configuration switched on or off via Roles. The set of values are: ContentDelivery, ContentManagement, Standalone, Processing and Reporting. By enabling a Role the configuration of that Role is included, and therefore the initialization associated with that Role etc. Not all Roles are equal however, Standalone is an aggregation of the other Roles, for the specific use-case of a single node instance.
As an aside, Sitecore now supports the three search technologies using a similar mechanism: by default ALL of the configuration files for all the search technologies are included in the files of a Sitecore instance(Azure, SOLR and Lucene), but depending on what is enabled in the Web.config, only one of those technologies is actually used.
xConnect does not support Sitecore Roles in the same way, but rather used a simpler method of replacing the .config suffix of particular files with the suffix of .disabled meaning that the application does not pick them up as config files at all.
So what do the use of Roles and config/disabled files mean for Sitecore installation?
It means that the installation process is in great part the same regardless of what kind of application or Role is being installed. If you look at the files included in the WDP (Web Deployment Packages) for any given topology it is apparent that the file sets are essentially the same, with the exception of the configuration files give two base application types: xConnect and Sitecore.
The installation process therefore is matter of creation of databases, web sites (or Web Apps) and copying of the appropriate file sets to their respective instances. This is achieved either directly using Powershell MsDEploy and SQl DacFx (local install using Sitecore Installation Foundation) or via Azure Powershell to create and provision the instances and populate them via .bacpac files and MsDeploy.