I am in the process of finishing a basement. One of the circuits I am using passes through a box that contains a smoke alarm. This smoke alarm is wired using 4 wires (ground/neutral/black/red). The red wire is part of a 14/3 wire that goes upstairs in the house (not sure where). My question is why does this smoke alarm have 2 hot wires (black red)?

Thanks for any help.