They can occasionally attack people
This photo of sign was sent from one of my friends traveling to Nara, a prefecture which is one of the most popular travel destinations in Japan, some time in last month. Apparently it was taken at Nara Park, where so many wild deer are spotted (they are officially protected as a national monument).
It seems that a number of people have been injured by deer, and thus the sign lets the visitors know that they can be a danger. On the other hand there seem to have been occasions where some of the deer are hurt by people. We need to respect each other accordingly.
I visited Nara long long ago, and I don't think I saw such signs then. One website said that signs like this started to appear in 2018, quite recently.