This is not unusual. Several factors are involved.
First, the medication for your pet does not carry a potential multimillion dollar liability for the company that made it, the doctor who perscribed it or the drugist who sold it.
Second, the pet medication is not subject to the same documentation and process controls that the "people" drug is subject to. That pushes costs up. The two may not even be produced in the same factory.
Third is a crazy aspect of the US drug system (or should I say pharmacology to not confuse it with other types of drugs?) Many of the drugs used today are used in what is referred to as an off label usage. The drug is originally developed, tested and qualified with the FDA for a particular usage. After qualification it is later found that the same drug is effective for other uses. These uses are not part of the original FDA process so they are not considered as "on label". However, the drug company is legally responsible for keeping track of these uses, keeping physicians who perscribe the drug informed of off label usages, and tracking the results of off label usage.
The off label usages at times pay off big. The drug gets used more for an off label usage than the usage it originally qualified for. But there are just as many off label usages that are not very high volume. The drug company cannot just decide to avoid the cost and ignore that usage because they can be sued if they are marketing to a physician and the physician has a patient who could have benefitted from the off label usage but the physician had not been made aware of the off label use. The pill for your pet does not carry anywhere near as stringent a requirement. Off label usage is only pursued when it is profitable.