This seems to be a strange issue with ArcGIS server, It is happening when I have a combination of Relationship class and Relate in MXD for that feature class.
In this case I have a Feature class with 1 Relationship class (simple) and 3 Other relates in MXD file, when I published this MXD, All relates working fine, but the relationship class is getting generated 4 times.
Refer to below screenshot, which shows 1 Relation ship class and 3 Relates.
This is the relationships list from ArcGIS server directory. The relationship create via Relationship Class (19) got duplicate 3 times.
Here I choose to create relationship class when related table need to be Read/Write, and create in MXD when the related table is read only.
I have tested this multiple times and this is occurring every time when there is combination of Relationship class and Relate.
I am using ArcGIS Enterprise 10.5.1