2011 Sonata help?

I purchased a 2011 Sonata used in April 2012 while stationed in Texas with the Army. Recently reassigned to Michigan and had battery issues. Car wouldn’t start got a jump and got it to the dealership they replaced the battery costing me $100 and that’s 20% prorated cost. Then 2 days later it happened again and then dropped it off at the dealer and found out the junction box was drawing the charge from the battery causing it to lose its charge. My question is should I have had to pay for the battery if the fault was with the junction box?

The battery was probably the original and that makes it 3-5 years old so its plausible that the battery needed to be replaced either way. This is especially so depending on how long this other problem has existed since constant drain down of the battery will shorten its life. Normally a battery will be load tested before it is replaced. So do you know if it was initially tested?

The kind of test to find your problem is checking for a parasitic battery drain and that is not a typical thing to do as a matter of routine. In the end it’s not as if you got “ripped off” - you paid $100 but replaced an old battery with a new one. If they find and fix the parasitic draw then you should be good to go.