Bass gets less attention than any other instrument at tracking and causes more trouble than any other at mixing. The reason is usually that the recording method was chosen by default rather than by decision, and the two available methods have very different failure modes.
What direct injection gives you
A DI takes the instrument signal before it reaches an amplifier. It is clean, consistent, free of room problems, and completely repeatable. It has excellent low-frequency extension because nothing is limiting it. It also has every string noise, fret buzz and hand movement the player made, unfiltered, because there is no speaker rolling off the top and no cabinet softening the transients.
The characteristic weakness of a DI-only bass is that it can sit in a mix without ever announcing itself. It is present on the meters and absent in the room, particularly on small speakers, because the information that makes bass audible on a phone lives in the upper midrange — the note attack, the finger or pick contact — and a clean DI often has that at the wrong level.
What an amplifier gives you
A bass cabinet is a filter with a personality. It rolls off the extreme lows that a DI captures, adds compression as the speaker is driven, and produces harmonic content above the fundamental that makes the note trackable on speakers that cannot reproduce the fundamental at all. Played loud, it also changes how the player plays, which is not a small effect.
Its weakness is that it puts the bass in a room, and rooms are worst at exactly the frequencies the bass occupies. A miked cabinet in an untreated space can be uneven in a way that is very difficult to correct, because the unevenness is in the recording rather than in the balance.
Recording both is not a compromise
Taking a DI and a microphone simultaneously is standard practice and it is not hedging. It gives two signals with complementary strengths: the DI for the low end and the definition of the note, the amp for the character and the midrange presence. Blending them lets the mix use each for the part it does well.
The catch is that they are not time-aligned. The microphone signal arrives later than the DI by the time it takes sound to travel from the speaker to the capsule — roughly three milliseconds per metre. Summing them without correcting for that produces cancellation in the low midrange, which is precisely where the blend was supposed to help.
Fix it by delaying the DI to match the microphone, or by nudging the tracks until the low end sums at its fullest. Do this before deciding whether the blend is working. A great deal of "the amp track is not adding anything" turns out to be a phase problem.
Reamping keeps the decision open
If the DI is recorded well, the amp part can be replayed later through a real cabinet and recaptured. This is genuinely useful when the session room is bad, when the amp available is not the right one, or when the arrangement is going to change. It costs one extra channel at tracking and preserves a decision that otherwise has to be made under time pressure.
It is not free, though. A performance played into a sound the player likes is different from one played into a provisional sound, and reamping cannot recover what was never played.
The instrument comes first
Before any of this: fresh strings if the part needs definition, old strings if it needs weight, and an intonation check. A bass that is out of intonation up the neck will be out of tune against the guitars in exactly the register where it is most noticeable, and no amount of pitch correction on a bass sounds convincing.
Set the action so the player is comfortable and the buzzing is under control. Buzz that is inaudible in the room can be very audible through a DI, because the DI hears the string and not the acoustics.
Compression at the source, lightly
Bass benefits from compression more reliably than most instruments, because the level differences between notes on different strings are large and mechanical rather than musical. A small amount printed at tracking — a few decibels, slow attack, release matched to the tempo — makes the part sit and does not remove options later. Heavy compression printed at tracking removes options permanently, and it is the one thing worth being conservative about.