Why is boxing called "The Sweet Science?"

As above.

Apparently author Pierce Egan first used it in 1824, when he called boxing “the sweet science of bruising.”