MTH PS2 and PS3 engines can be renamed in the remote for ID purposes. If the engine's memory gets reset, it loses that info and has to be added again.
If it's changed by a dealer loader, it retains the info and becomes permanent.
I've built many engines and renamed them with my DCS system.
I saw you asked about Lionel, and that I don't know much about.
(EMD) G scale engine CR (NS) SD80MAC build | O Gauge Railroading On Line Forum (ogaugerr.com)
scratch built SD70ACe (1/32 scale) | O Gauge Railroading On Line Forum (ogaugerr.com)