I had the same problem when I bought my CX-9. There were two wires crossed that caused the horn to go off. All I did was bring it back to the dealership and they fixed it.
Kinda silly to have to unlock the car before starting the vehicle. The autostarter works from a much further distance...