My form doesn’t use trim on those POST values when displayed, but it does use the proper WordPress sanitizing function of esc_attr for POSTed input values, which does several santization functions which must also trim extra white space as well.
However, your idea of trimming before validating that’s it’s a valid email is a good one. Should probably trim all posted values before validating, just to avoid some additional frustration.