I have a form on the portal which has some fields, those fields are all set to optional but on the portal they are required.
I don't know what makes them required.
There is no js code involved. There are no business rules.
What should be the next thing I check ?
You should look for your Form in Dynamics. There in you can find Entity metada and it does have an option.
If not look directly under Form Options and there you will find Make All Fields Required