Hard floors are easier in a pet home and it is not close. Hair sits on top of them where it can be lifted, rather than working down into a pile where it has to be pulled out. If you are replacing flooring in a house with animals, that is the practical argument for it.
That does not make carpet a lost cause. It makes the edges and the traffic lanes the job, and it means the vacuum has to go slower than feels necessary. A single fast pass over carpet in a pet home moves hair around rather than removing it.
Shedding is seasonal for most breeds, heaviest in spring and again in fall, and it is dramatic enough that clients often think something has gone wrong with the cleaning. It has not. There is simply four times as much hair for a few weeks.
Two things help more than anything a cleaner can do between visits. Brushing the animal regularly, outdoors if possible, takes hair out of the house before it lands. And a mat at whichever door they use catches a surprising amount of what would otherwise be walked through the whole house.
Everything else is frequency. In a shedding season, a house on a standing visit every two weeks holds far better than one cleaned hard twice a year, because the hair never gets the chance to work into the places it is hard to get out of.