It probably helps to understand that an Extra Special Bitter (ESB) isn't all that bitter, especially compared to the American pale ale and IPA's of today, but maybe 200 years ago it might have been considered bitter compared to the softer brown ales of the times. They are generally still have a medium mouthfeel which can give it a perception of sweetness with a definitive hops presence. It probably should be noted the difference between bitter and hoppy. Yes, you can have both like in an IPA, but you can also have hoppy flavors without the bitterness depending on when the hops are added to the brewing process. Typically if added early to the kettle for the longest boil time, the more bitterness is converted and extracted to the beer. If you want to compare bitterness to an ESB try a Stone IPA or comparable Southern California IPA which can come across as "bitter."
There are actually 3 classes based on strength from lowest to biggest: Ordinary Bitter, Special Bitter/Best Bitter and ESB. These beers might have been the predecessor of Pale ales, but are usually more copper or amber in color.
Examples: Adnams Bitter, Greene King IPA, Bass Ale, Whitbread Pale Ale, Redhook ESB, Fuller’s ESB, oh and Inventors Brewpub's very own 1.6k Rock ESB. (the name is a fun play off an Amber beer that was previously made in PW)