Going further, 1958 marked the main federal "animal cruelty" law, though it wasn't called that then, and many states followed with their own laws. Their purpose, as I mentioned, was originally to protect humans. Much of the animal welfare history is based on lawsuits trying to interpret that law from the animals perspective. Thus, a change in interpretation vastly preceded a change in laws.
The first "animal welfare" case which looked at things from an animal's perspective, as opposed to a human perspective, was in 1974. Jones vs. Butz in NY state. A previous law had outlined the proper way to slaughter an animal, which was put in place for health purposes. Jones challenged the law as inhumane, and the animal welfare side lost the case as the judge ruled that human health, not animal suffering, was the goal of the law, and the court's role is not to legislate meanings to laws that were not intended.
2nd Case was Jones vs. Beame, yes the same Jones, in 1975. He held that 3 zoos in NY city did not provide sanitary conditions for their animals and wanted them shut down. He lost again, but the case got a lot of press, and zoos across the country quickly improved their practices for fear of a lawsuit.
The first legal semi-success was in 1979 in California, the Animal Defense Council got a temporary injunction against the fish and wildlife services and U.S. Navy from exterminating a feral goat population on San Clemente Island, as their planned practices (shooting them) were inhumane. However, the injunction was temporary so that the Navy had to investigate alternative plans, they did and concluded that death was the best option, and the court agreed, so the goats were killed anyway.
First "animal welfare" as opposed to human focused legislation, as opposed to interpretation, was also in California in 1981. A woman was found dead, and her will stated that her dog was to be put to sleep and buried alongside her. There was a big public outcry, and the California legislature quickly created a law which retroactively banned putting healthy animals to sleep as directed by wills.
Also in 1981 in California, animal activists successfully stopped the Navy from killing feral burrows in China Lake. The Navy felt they were a danger to the airfields and could cause a crash. A temporary court injunction was successful, and then the court made the Navy investigate alternative plans. The alternative plans were made, but the Navy still concluded killing them was the best method, similar to the goat case. But this time even that was shot down by the court, and they forced live capture, which was successful and the Navy then continued with that plan for years. This case and the press about it also prompted the start of PETA.
Also in 1981, which still stands as the only case regarding researchers, a researcher in Maryland had his monkeys stolen by PETA. When the perpetrators were found, they were prosecuted successfully. But they also pressed charges against the researcher for failing to give the animals proper vetinary care. He was convicted of a misdeameanor by a judge, appealed and was convicted by a jury, but then the appeals court (no jury) overturned it AS THE PURPOSE OF THE LAW WAS TO PROTECT HUMANS FROM DISEASE, and government sponsored medical researchers are exempt from such a law when studying disease on animals.
I won't go on any longer. As the cases go on, the animal welfare side slowly gained ground, though its still debated in courts. The new legislation started in the 90's, picked up steam in the late 90's, and continues today. Typically, they are clauses added to the original 1958 laws outlawing specific practices. So what we have now is various interpretations by courts of the 1958 law, some courts uphold it as an animal welfare law while others do not, but the newer laws are pretty clear and upheld by the courts.