Cacáo seeds are rarely sweet per se, containing bitter polyphenols & alkaloids…
… excepting a few chemical compounds such as the honey-like phenyl acetaldehyde which are intrinsic to it.
Sugar is to chocolate what salt is to most other foods. An appropriate amount enhances & even catalyzes flavor. At the most fundamental level, it fixes cacáo’s bitterness by re-partitioning cocoa compounds along its surface. As sugar absorption proceeds over time, binding occurs & changes in the tannic structure of cocoa result in less bitterness, volatility & astringency.
Conversely, too much sugar can overwhelm a chocolate & become just plain cloying.