Question: I am working on a custom entity on dynamic 365. This entity is manipulated on Dynamic 365 Portal using web forms. Whenever I am creating a record in the entity, it is showing "System" in out of the box "Created By"column. Can anybody tell me what is the reason behind it?

Answer: 
As explained above, the owner of a record in CRM is a lookup field to `systemuser` entity.
The portal user is actually a `contact`, therefor can not be assigned as record owner.
Owner, createdby, modifiedby = CRM Login user = systemuser Entity. It can be licensed user, application user (service account), or SYSTEM (only used by CRM product). 

Portal Login user = contact Entity (sometimes Lead).

Records (OOB or custom entity) created in portal will be impersonated by product using SYSTEM user while creating in CRM DB. Because contact cannot be an owner or createdby. This is the reason.

You may customize to have another custom attribute called `new_createdby_portal`and use [Entity Form Metadata](https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/entity-form/entity-form-metadata/) mapping to capture this field from portal side without code.