A mix of the three. Sometimes media like when I made an evil knight that looked like General Zod from Man of Steel. Sometimes mechanical wanting to try a particular class with abilities to see how it works. Sometimes thematic wanting to fit the them of the campaign like playing a paladin in a campaign against demons where we want to play holy characters fighting the darkness.