When simple, constant marks are all that's needed, rubber stamps or pad printing are straightforward, inexpensive options.
Most products these days have some sort of identification mark. However, not every part or assembly requires something as sophisticated as serial numbers or 2D Data Matrix codes that change with each assembly that comes down the line. Indeed, sometimes a few letters or numbers, or even just a colored dot, are all that's needed.