5xx HTTP status codes for responses help standardize how API producers communicate that an error has occurred via a backend system responsible for for returning data used in an API response. 5xx series HTTP status codes communicate that an error has occurred in standard way without revealing too much about the details of backend systems.
The use of 5xx series HTTP status codes across all your responses helps ensure that API consumers do not think they have made a problem, and know that it is up to the platform to fix. Ideally 5xx series responses also comes with adequate information about how to submit a support ticket and receive more help when it comes to whatever went wrong.