With older books the publishers simply don't have electronic rights.
Publishers are trying to snatch up those rights now.
Some authors are putting those books out themselves.
And some authors, I hate to say, are completely clueless about their electronic rights and what they should be doing with them.
As for random ebooks in a series where the publishers own the rights, some publishers are clueless. And some of it is because they're paying for ebook conversions and have a huge backlog of titles that need to be converted, requiring time. And if they bother to proof the ebooks, which so many unfortunately don't do, it takes even longer to get them all out. Yeah, you'd think they'd go in order, but the conversion company may be the ones doing it randomly.