This unexpected behavior is all because of the property cms.components.allowUnsafeJavaScript that after SAP Commerce 1905.19 version it is set by default as false.
This property exists because SmartEdit uses the CKEditor as its editor for the paragraph component (text) type. The CKEditor automatically verifies the HTML and transforms the content automatically to the preferred form.
If you want to allow inline style, including linking to anchor in the text, in the CKEditor, set the value of cms.components.allowUnsafeJavaScript to true in the Hybris Administration Console, or in the local.properties or project.properties file. For example:
cms.components.allowUnsafeJavaScript=true