Milk helped mammals claw their way to the top of the food chain. And all mammals have lactose in their milk. OK, with two exceptions. The very earliest mammals, known as monotremes, came along too early to really get it. Like their descendents, the duck-billed platypus and the echidna, they still laid eggs, so their milk didn't have to be as complete as later mammals' milk.
Some sources say that their milk has traces of lactose in any case.
And the pinnipedia, big sea mammals like the sea lion, have so much fat in their milk that it made the lactose superfluous. All the rest of us mammals have lactose in our milks.