Plastic is sometimes useful to preserve fresh food to some degree. Without plastic many goods wouldn’t be viable. Would be nice though if at least the necessary plastic was highly recycleable, as well as cost efficient etc.
As for mayo, maybe just eat less of it as it isn't exactly healthy. Or get the ones in glass bottles. Same goes with salad dressing.