So let me put it clear from the first line: trusting invalid certificates is wrong.
And now I will explain why it’s wrong and why there are few excuses for it.
We are talking here about certificates for SSL encryption, which serves basically two purposes:
Invalid certificates obviously defeat the second purpose of verifying the other end’s identity:
Let's start with a bit of history.

Casim.ir is a URL shortener developed by Nicolas Hoizey in PHP eleven years ago (stylized by then as Cas.im/ir) with the intention of creating a light and simple URL shortener.
About seven years ago, I installed it to create my own private URL shortener at chu.so and some other open and public ones with some modifications on Nicolas's project.
Shortly after, I started contributing to the project with improvements and bugfixes and almost instantly Nicolas gave me direct write permission.