Gary Gygax invented two dimensions of sentient 'alignment' of one's personality: chaotic / lawful tendencies started in Basic and then in, Advanced Dungeons & Dragons, there was 'good / evil' spectrum. This was supposed to serve to know what the monster wanted and how they would go about getting it. For example, a chaotic and evil Black dragon may also value torture and suffering - and may even pay some of his or her deeply loved gold-wealth to get this. Contrast that with a Silver dragon that may sacrifice gold in order to save a friend (casting Raise-style spells costs gems of specific value). Though both would gladly kill to gain gold, both dragon types gravitate to very specific targets and situations. Some of this is covered by the nine alignments, but not much.
Player's Characters ('PCs') have backgrounds allowing them to know where they are from - but the design of the game doesn't specify what they will do. This is for two reasons: for one, D&D is always a game about choices and having a fixed and planned course of action means one runs out of options (when a character must do a certain thing it is called 'railroading' in this game). The other problem about the background impacting game play: it demands spotlight. This is why both DMs and fellow players alike resent long, story-based elaborate life-tales - it requires both more work and attention to be spent on that specific character.
Is there another way? Yes. Thankfully,
On stage, in shows and on film one needs a character's motivation to play it well. Imagine a female wolf - it is an animal so what it wants will be simple: food ('meat'), rest ('find a place with cover'), water ('clean tasting') and possibly sex ('at the right time of year'). Other than not getting killed, this is the entire list. How would you know when it flees from combat? Why would it fight in the first place? The alignment is 'neutral' or 'unaligned' - so there isn't much to go on. One could write up an entire background for this wolf but it seems arbitrary and it doesn't solve anything.
Compare the actions of this non-player character or encounter once it has a motivation. Say it wants to 'feed its young'. Now you know what it will do and why. Will it attack? Yes, if it thinks it can get meat off of its targets ('it will not attack golems, elementals nor undead'). If the target throws meat that is large enough it will take it and leave. Where? To its pups, of course. Will it fight to the death? No - it will instinctively know that if it dies the young will probably die as well. Can it be tamed or befriended? No, not until the den is abandoned. In fact, two words of motivation answers thousands of questions better than any alignment or background ever could.
How To Generate Random Motivations:
A motivation needs two things: what they want and why. This can be placed in three tables:
Remember: none of these virtues are necessarily good. For example: restraining a group or population the king doesn't like is called 'genocide'. Forcing a population to agree with you (concord) is usually oppression, censorship and 'shooting all the intellectuals'. Some of the most terrifying and brutal overlords were extremely humble. You are not trying to solve the problem of good vs. evil here. You are just finding out what your character wants - and why.
Next, cross this goodness vs. nastiness against how basic or sophisticated this urge is using Maslow's hierarchy of meaning, use and 'needs':
Each level of the mind can have its own so-called 'good' and 'evil' motive. How that is expressed in the character's life pends on what part of the mind this impulse lives in: