Many people, including me - since I'm not a truly bass player - record bass guitar using a direct inject (or DI for short) box instead of using a microphone on a bass amplifier.
For one thing, you don't have to own a bass amplifier and when you have a small recording space, that's pretty important. In a perfect world, you'd always plug electric guitars and basses into guitar and bass amplifiers because those amps are designed to accept the high impedance outputs of electric guitars and basses.
The problem is that most recording interface preamps do not have high impedance inputs, so the sound that gets recorded is pretty bad due to the impedance mismatch. A DI is a box that gives you that hi-impedance (hi-Z) input. DIs also take the unbalanced input of an electric guitar (potentially noisy) and make it appear as balanced to the preamp/recording interface. Still and all, even using a DI can yield pretty flat and thin sounding bass.
But there are some things you can do to improve the sound of a bass recorded through a DI box. Using a combination of EQ, compression, and a tape saturation effect in Pro Tools, Graham Cochrane shows you in the below video how to bring this improvement about. The difference is subtle, so if you have headphones you might be able to hear the improvements better.
Some DI boxes are part of guitar and bass recording packages that include software that does the stuff Graham talks about and much more. For example, I use a TonePort DI from Line 6, such as the one in the Studio GX (see picture on left above) that comes with POD Farm software, which contains dozens of amplifier simulators and pedal effects.
Purists will still say you will always get better sound with a real amp, but I think most people wouldn't be able to tell after recording with a system like the Line 6. Meh - to each their own.