As previously stated, the characters you face as your 7th and 8th CPU opponents (the mid-boss and boss) depend on the corporate affiliation of the opponent in the 6th battle. Notice that half of the 16 opponent patterns end with an SNK character, and half end with a CAPCOM character. This gives you even odds at getting one company's bosses over the other's.
However, with 16 patterns of 5 slots each, we have a total of 80 slots -- and 24 characters won't divide evenly into 80 slots. 1/3 of the characters get 4 slots, while the other 2/3 only get 3 slots (meaning that 1/3 of the cast will show up in more patterns (i.e., more frequently) than the other 2/3). One would assume that the eight 4-slotters and the sixteen 3-slotters would break down evenly into four from each company and 8 from each company, respectively -- but they don't. Only one SNK character (Kim) appears in 4 of the patterns, while seven (!) CAPCOMers get to be 4-slotters. Here's the breakdown:
SNK 4-slotter = Kim
CAPCOM 4-slotters = Ryu, Ken, Guile, Chun-Li, Bison, Balrog, Sagat [the 4 big names of SF, plus the 3 SFII mid-bosses]
SNK 3-slotters = Terry, Ryo, Kyo, Iori, Mai, Kasumi, Mr. Karate, Earthquake, Genjuro, Shiki, Choi
CAPCOM 3-slotters = Dhalsim, Vega, Gouki, Tabasa, Hugo
Finally, notice that each of the 16 patterns begins with a different 1st battle character. This way, you will always know which of the 16 patterns the CPU has selected as soon as your first opponent appears. This might be of use to folks like neojedi who might want to make image-captures of certain chara-vs-boss matchups (if you want to pit Mr. Karate against Honki ni natta Mr. Karate, you know that you must begin your game in pattern 2, 4, 6, 8, 10, 12, 14, or 16 -- since these are the patterns that end in a CAPCOM character, thereby leading to the SNK mid-boss & boss).
--Chris