Why did my DNS go bad?

I installed LEDE 17.01 when it came out stable. I haven't touched the router I installed it on since.

For the last several weeks I have been dealing with an issue where I could not get the subdomain of a website to come up. It always reported a DNS Server not found message. But other people not on my network had no problem connecting (and seeing) that subdomain. I had LEDE set for OpenDNS DNSCrypt. And I reported these issues both to OpenDNS and the website thinking it was a problem at their end. But everything was working fine for them. I turned off DNSCrypt thinking it might be causing the problem, but the problem persisted in a different way. The subdomain started resolving correctly. However, the domain (which used to show an EV cert) was now showing a non EV cert. Again, other people not on my network were seeing an EV cert and could resolve the subdomain.

I reinstalled LEDE (wiping everything without keeping settings) to 17.01.1 and set everything exactly how it was before configuration wise (DNSCrypt etc). And now everything is working fine. The subdomain resolves and I once again have EV cert display. After this fixed everything, I remembered this happening to me previously (a few years ago) where some domains wouldn't resolve and the problem turned out to be with my OpenWRT router that was providing DNS services.

What causes this? Is this a cache thing? How can I prevent this from happening? What exactly is happening?