Here is where the time and money is gobbled up. For starters, you are going to a dealer, and the overhead is enormous. Secretaries, paper, phone lines, shop uniforms, lot boys (to clean/wash your car for free), lighting the place, for tech's to see what they are doing, and to sell cars at night. Plus, insurance to keep you and your car safe, while it's in their hands for a day....just to name a few.
Now for your half hour's time. The mechanic waits for a job, (yours) at the dispatch window. Then drives your car in the bay, to varify, (diagnostic time) that it is a battery and not a charging problem. More time is spent while... he/she looks over the car for "up-sells" (for the car's safety and yours) to bring to your attention. Time is ticking away again, waiting with other techs at the counter, for parts (your battery)...first come, first served.
R & R the battery. Finalizes the charging system. Writes a little paper work about the job.... possibly future service or something noticed by an experienced eye, added to the work order. Road tests the car... (always!). Parks it in the wash bay, to have the lot attendent hand you back a clean car.
You are right, time is money taking it to a dealer. And that's where it's going.
Believe me, a dealer is taking on a big headache, and they (most dealers) are not trying to "Jesse James" you.