How do wild animals get rabies?
Such viruses have a natural host, which might get sick, but is usually not killed by the virus. From there, the virus can get zoonotic (jump over species barriers) and infect other animals when it comes to contact. For Rabies the reservoir hosts are different, for the US these are bats, skunks and racoons. For more details, have a look on this PDF.

Another example for this is the SARS virus (a corona virus) which most likely lives in bats naturally and has jumped from there onto birds and from there infected humans.