Agreed, Both keys must be (factory) or professionally programmed by FCCID # of the key fob. The dealer or "broker" must do this for the fob and the car to recognize appropriate year of infiniti before they sync.
Otherwise crooks could just go buy any random infiniti key fob from the internet from 2006 -2017 & unlock and start any car or truck.
Expample: my 2008 infiniti m35 key FOB was identical in look to my 2013 G37 however the FCCID# dictates what year of car it will sync and start. Kind of like a serial # sequence.
My guess is that the dealer either confused which extra key fob went with your car and it is programmed for another year or car, or he just bought one and didn't pay to have it programed. Either way it will only do what it is doing until it is plugged in and programmed for your car, which is usually $150.00 at a dealer or locksmith. This is the procedure that is needed
https://www.youtube.com/watch?v=OjXzDJ8kNFY