There is currently no way to keep the Expand All box unchecked on the Affiliations tab. You will need to uncheck it on each Profile you view if you want the details to collapse into their groups.
The reason the default is "Expand All" is twofold: It is standard practice to show all values so that information is not overlooked. You can look for an Affiliation code by clicking anywhere in the list and typing the first letter of the code you are looking for. If the list is expanded it will look through all values. If not expanded, it will only look at the values it sees - usually ungrouped Affiliation codes and grouped ones.