who said it's necessary?
it depends on the player, the goal of the player, the types of folks that you do or plan to play with, your own natural rhythm, your own ability to hear your own inaccuracies, and the style of music.
So many variables.
I have at times practice with a metronome, and at times with a drum machine. Depends on what I was trying to fix in my playing.
Biggest thing I have found to solve my playing issues if I want to be picky, is recording myself playing and then playing it back at a slower speed. Amazingly revealing. Playing along to a song (like to a track from a band I like) and recording it is super helpful, specially if I put my bass in left side and song in right, or whatever, then mix it accordingly, and also slow it down when needed.
musicians should be able to play metronomically as a basic skill, and yes drum machines are a good way to learn to do that.
But musicians mostly play with other musicians, or on their own, and that is often a situation where tempo and rhythm might NOT be metronomic, but will need to groove with other musicians, in which case you benefit from practicing playing with songs, with bands, with albums.... just as much as with a metronome or drum machine.