Your horn isn't supposed to beep when you lock the car. If it does beep then it is telling you that something is not closed properly. Could be doors, trunk lids, top latch, or center console compartment. The function is described on this page from your owners manual: