It sets an expectation. I've never been in an environment where "optional" late-night things like dinner were truly optional. There's an expectation set that you're working at least as late as the dinner, and probably after, regardless of results or the value you're providing to the company.