I use classes, backgrounds, spells, feats, etc. for inspiration the exact same way I get inspiration from pictures, minis, a character from a book or show or video game, etc.
Many is the time I've thunk up a character concept based on a class, only to switch to a different class as part of the character-creation process. Same with other game mechanics (feats, weapons, etc.). Likewise, sometimes I'll be inspired by a character from fiction, and by the time I've filled in the mechanical details, they are completely unrecognizable.
So for me it's not so much about restrictions vs. freedom, or mechanics vs. story, it's more about what catches my imagination and where that leads.