In Maryland, Gov. Larry Hogan signed a law in April that bars pet store operators from selling dogs and cats but allows them to host adoptions. Stores may benefit financially from the adoptions because they can lure potential customers, Mr. O’Neill said.

The law in Maryland, which takes effect in 2020, has not put a damper on business at Charm City Puppies in Columbia, which has sold about 95 dogs in the past month, said Ashley Lawson, an assistant manager. She said on Wednesday that the store sold only animals from federally licensed breeders across the United States.

“Today we are actually low on puppies because of the holiday season,” she said, although the store was selling a Cavalier King Charles spaniel for $2,499 and a Yorkshire terrier for $1,999.

“We are still looking forward to fighting it or overturning it,” she said, referring to the law. “It is all in the beginning stages.”

Some customers do not have the option to adopt, particularly if they are looking for a certain type of dog, she said. “That is why we believe they should be given a choice.”

In California, the law that took effect on Tuesday was written by two State Assembly members, Patrick O’Donnell and Matt Dababneh, both Democrats. The legislation’s fact sheet said the bill was meant to address “extremely minimal” federal standards, such as a requirement that says a cage may be only six inches larger than the animal it houses and may be cleaned just once a week.

There were also financial considerations, with approximately $250 million a year in taxpayer money used to house animals in local shelters, the fact sheet said.