Object of type stdClass cannot be printed when received JSON response
Short answer: because that is how the API was written.

Long answer is that they do not know how the object should be printed.

To cast an object to a string, you need the object to have a __toString method, which the object in question does not contain.

If you want to print the stringified version of the object then don't transform to an object using json_decode.