Unlike many questions where we ponder Judea Pearl’s do-operator, there is nothing unethical about a trial randomizing people to dogs. (Assuming the people have been vetted.)
Idk who would participate in that study. Either people want a dog and get one or they don't want and don't get one. Don't think people would like a diceroll making the decision for them.
The article seems to indicate that they established a socio-economic baseline: "The study first established baseline health and socio-economic information on more than 2,000 subjects"
Ok, let's detach it from money. Something like "healthy people are more likely to have time for dogs".