Pigs cannot be eaten because they are not kosher. Dogs, too, are not kosher. However, while we do not eat pork, based on a biblical prohibition, which would include dogs in the same prohibition, that doesn’t mean that we cannot raise pigs on a farm on a farm or have a dog as a pet. We just can’t consume them.
From what I have read Muslims do not even wish to ride in the same car as a dog.