There is a connector on the stock airbox for it to plug into. The truck most likely had a CAI on it and they forgot to plug that back into the stock air box, when they reinstalled it. Mine is sitting in the CAI air enclosure but it's not the same as a stock enclosed air box.
The stock vent is open to the air. No filter no nothing. I don't understand why Nissan did that way but they did. It's been discussed on here before. The jury is still out. Personally, I've left mine open. After 97k miles and routine maintenance I haven't had a problem. And the 4 wheel tails around here are real dusty.