This is a classic PHP trick they don't tell you in school. This is the easiest way to convert an array of objects into an an associative array.
imagine going through an entire parse unparse cycle to do a basic processing task
In some cases this is actually useful, this example however is very stupid.
imagine doing this for accessing a single property on the object
whoever wrote is probably some PHP version 3 boomer who doesn't understand what objects are.
no it was somerandom CS student in 2013 who now has a degree and makes 4 times my wage
I'd personally recommend freelancing if you don't have a degree. You can get paid a lot more money and work with less shitty code.