Because "Bonan nokton" is a short form of "Mi deziras al vi bonan nokton." (I wish you a good night.) Therefore you need the accusative form. Same for "Bonan tagon", "Bonan matenon", etc. but also for "Saluton." "Dankon." "Pardonon."
Not quite. The meaning would be from "Mi deziras bonan nokton al vi". "I wish a good night to you". '-n' gives the direction of the sentence "I wish a good night", but 'al' then directs that good night to 'vi'!
They need the acusative "n", to be said correct as it comes from "me deziras al vi..."
Could be, but Duo is teaching you 'correct' Esperanto, not Esperanto for the idle!