It’s not necessarily not their own music - though to me dj is then a misnomer, a dj plays records and isn’t a musician, on that I concur.
But a lot of electronic music is made up of different loops - a cyclical drum track for instance, or a repeating bass pattern or chord sequence. These can be played ‘live’ by having loops assigned to buttons which trigger them, on a ‘sequencer’. Which is a million miles away from playing instruments live, but does allow for improvisation.
To come back to your point, these guys might be pressing buttons to trigger melodies and rhythms of their own composition. Though typically, there will indeed be lots of samples from other songs in the mix. What they are doing is closer to the traditional role of a producer or sound engineer in a recording studio, than a dj, imho.
I couldn’t have told you this last week by the way. But a retirement hobby taken up this very week, has involved pottering with this stuff.