The main thing to remember is that all of the recommendations are just that, recommendations. They are not perfect. With that being said, below describes the process of determining the recommendations for pitcher roles.
To determine starters, it orders pitchers by real life IP/162 who have less than 5 saves or more than 150 IP/162. Therefore, your recommended number one starter will be the guy who had the most IP/162 on your team. It continues on down the list, adding players based off of most IP/162 until it either has accumulated 900 or more IP or it has reached 6 starters. When there aren't enough SP to choose from, the relievers are evaluated by a combination of IP/162 and IP/GP, favoring those with a higher IP/GP.
Once the starters are done, it determines the Closer A. He is chosen based off the remaining pitcher with the most real life saves. If no pitcher has any saves, no pitcher will be chosen for the Closer A spot.
The next pitcher role chosen is the Setup A player. He is chosen based off of the remaining pitcher with the most games played in real life.
Long A is chosen next by taking the remaining pitcher with the most IP/162 in real life.
It again chooses a Setup A player based off of the remaining pitcher with the most games played in real life and then a Setup B based off of the same criteria.
A Long B is chosen next based off of the remaining pitcher with the most IP/162 in real life.
The mopup pitcher is chosen next based off the remaining pitcher with the worst $/IP remaining. Since salaries are based off of how a player should perform in the sim engine, this should be the worst remaining pitcher.
Every remaining pitcher is set to a Setup B role.
These recommendations go in this order so if you don't have many pitchers, it may not recommend some of these roles.