It can be a great upgrade from a simple metronome to a great accompanying instrument to play along to. Even most pedals, like the Boss RC-30 loop pedal, include a simple form of a drum machine to jam along to. With a separate drum machine, you can make these tracks much more appealing, adding time-signature flips, bar-breaks, basic rhythms, etc. An artist I very much admire who uses drum machines along with his live performances is Chet Faker, who has that perfect balance between jazz-neo soul guitar lines, with repetitive drum machine beats and good vocal lines.