I build Mejai's regularly if I'm ahead. -shrug-
Say I'm going 3-0 in lane pre-15 minutes. Along with CS, I can either buy Mejais or I can finish Lichbane or maybe Rabadons even or whatever. If I can turn my level advantage into enough of a driving force, I can snowball and get my Mejai's stacking and I can finish before late game where I WILL die eventually, and thanks to the recent changes this is even moreso the case, easier to stack it but the penalty is much higher.
Occult I rarely buy, usually to mess around with friends and go AD Crit Naut or something stupid. But I wouldn't say no to building it seriously if I actually played any AD melee carries.
Frankly, they're viable purchases on snowball champions or anybody really with high AP/AD ratios, and there is plenty of counter play through focusing, ganking/camping, etc, to make their purchase more on the risk side than the reward side. It's not about being cocky, it's about being confident in being able to secure kills & assists to stack it safely and reliably, and finish the game before Lv. 18 where no matter how much AP you have, a 2-6-2 Yasuo can one shot you.
As for bot games, well, game isn't nor should it be balanced around bots, so uh, yeah.