@Mtt Here's part of the definition from the RFC:
The 404 (Not Found) status code indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
I wouldn't say it's the equivalent of failure, a resource can have gone missing mistakenly or have been deliberately deleted. Or it might have never existed in the first place (a mistyped URL). Avoiding broken URLs is a noble cause and something I strive for myself. But when something is gone for real or never existed in the first place, 404
(or 410
) should be returned by the server so that humans and robots, like search crawlers, can take necessary actions.