The brains in almost all intelligent animals, from humans to crocodiles, evolved once. The most recent common ancestor of you and the average salamander had a brain that wasn't that much different than ours. It's not particularly surprising that both dogs and humans dream, because our most recent common ancestor was only a few tens of millions of years ago.
The most recent common ancestor between humans and octopuses was hundreds of millions of years ago. That ancestor wasn't dumb the way a frog is dumb, it was dumb the way a clam is dumb. It quite literally did not have a brain.
So yes, it's weird that both octopuses and the other branch of intelligent life both dream. That's interesting, and it tells us something about intelligence. If both birds and bats, who developed flight independently, both had sonar and bad vision, that would be interesting, and would tell us something about flight.
The most recent common ancestor between humans and octopuses was hundreds of millions of years ago. That ancestor wasn't dumb the way a frog is dumb, it was dumb the way a clam is dumb. It quite literally did not have a brain.
So yes, it's weird that both octopuses and the other branch of intelligent life both dream. That's interesting, and it tells us something about intelligence. If both birds and bats, who developed flight independently, both had sonar and bad vision, that would be interesting, and would tell us something about flight.