Why entropy is not zero while free energy of formation of element in its standard form is zero?
I'm assuming you're asking, why is
STANDARD MOLAR ENTROPY
Any substance at room temperature will have some form of energy dispersal, so its absolute molar entropy cannot be zero. That is, anything at room temperature will have some form of motion, whether it is internal or external.
For example (Physical Chemistry, Levine, Appendix),
CHANGE IN STANDARD MOLAR GIBBS' FREE ENERGY
On the other hand,
#overbrace("X"("phase"))^("Elemental state") -> overbrace("X"("phase"))^"Product formed"#
Thus, nothing happens, and the free energy of formation is trivially zero (there is exact "conversion"). Same with the enthalpy of formation, because there is zero energy input/output resulting from the "conversion".
As a sidenote, this is only true for elements in their ELEMENTAL state. So, if one had to form
#1/2"Cl"_2(g) + e^(-) -> "Cl"^(-)(aq)#
This would have (Physical Chemistry, Levine, Appendix)
#DeltaG_f^@ = -"131.228 kJ/mol"#,
#S^@ = "56.5 J/mol"cdot"K"#,
neither of which are zero.