Thanks so much for reaching out on this! I'm certainly happy to explain. The fees on any purchase are there for a few different reasons, with our main focus being to provide a positive buying experience. We use the fees to ensure the site is up and running at all times. They also go toward our customer service staff to ensure that we're here if you have any questions or need any assistance. Last and most important, they're there to ensure we can provide our FanProtect Guarantee https://www.stubhub.com/legal/?section=fp which means that you'll get your tickets on time and they will be 100% valid for the event or we'll get you replacements or a full refund. The fees do vary depending on the event, price, and delivery method, but ultimately they are there for the reasons listed above.
Because it varies so much per event and by fulfilment, it's not something that's easily determined, so there wouldn't be a way for us to provide the details up front. Which in turn is why the price + fees aren't always accurate to the cent at checkout.