Right. So, if the SIL agreed to bring the mac'n'cheese, she was rude to just shove it at the hostess at dinner time instead of prepping it beforehand or making arrangements to prep it there.
In the alternate scenario, if the SIL didn't agree to bring it and the hostess just wasn't taking no for an answer so she decided to bring salad and the boxed mac'n'cheese, she was still rude for giving it, unprepped, to the hostess at dinner time instead of declining to bring it entirely, prepping it beforehand, or making arrangements to prep it there.
It's possible that the hostess was rude, depending on how she conveyed her requirement for mac'n'cheese to SIL, but SIL was definitely rude for failing to prep the dish or make arrangements to prep it there.
It was not rude, in and of itself, to bring boxed, just as it would not have been rude to bring frozen, deli, or home-made.