It's a bug. I think it's unfortunate that it's just a bug; 5E is the only edition that has spellcasting where Wizards can't learn every spell. I'd love to see it actually be the direction the game takes for Wizards. But it's just a bug, and will be patched out at some point.
Wait. Could wizards learn divine spells in 3e and 3.5?
Yes, though a lot of people didn't realise it. In 3e/3.5, a Wizard could scribe any spell into their spellbook if they found a written copy and made an appropriate Spellcraft check. They could only choose from the Wizard/Sorcerer list for spells they learn on levelling up, but otherwise they could learn spells from any list as long as they found a scroll or something. In previous editions, Wizards could simply "research" new spells, and any spell that already existed was automatically allowed, regardless of whether or not it was a Wizard spell. 4E didn't actually have spells; all abilities were directly a result of class features. 5E was the edition that took away the ability for Wizards to learn non-Wizard spells.
It's honestly not a big deal; with a few exceptions, the Wizard spell list is superior to every other spell list. But it is a neat thing that Wizards have always had that they don't anymore, and it makes me a bit sad.