A flat bottom wing is more stable and will want to right itself due to the nature of the wing being flat on the bottom and curved on the top.
A semi or full symetrical wing is more aerobatic in nature and will tend to stay where you point it.
Di-hedral is another aspect that helps flat bottom wings be more stable and self righting, the more dihedral the more stable the airplane, on a flat bottom wing.
The self righting nature of trainers has less to do with the airfoil type and more to do with the decalage and the placement of the CG further ahead of the center of lift than is required for positive stability. This increases the airplane's speed sensitivity.
The symmetrical airfoil has equal response to positive or negative angles of attack and zero pitching moment, while the flat bottom wing has a large negative pitching moment in response to creating lift.
Dihedral has nothing to do with type of airfoil.