Some bacteria infect both animals and humans, and there is also horizontal gene transfer between bacteria, so if someone is infected with two (or more!) different bacteria, (e.g. in a hospital environment - see https://pubmed.ncbi.nlm.nih.gov/30248271/), that can result in the relevant resistance genes to be transferred to another disease, creating a strain of it that is also resistant to that antibiotic.
There are a ton of bacteria that infect both humans and animals. For example MRSA.