Because it has nothing to do with whether or not you have actually done something that might affect the warranty, and everything to do with giving them an excuse to reduce their warranty expense.
However, this does somewhat depend on the dealer. I have found that if you actually pay the dealer to do the modification instead of DIY, they are much less likely to inform the OEM that your modification might have voided the warranty. Funny how that works.
All that being said, the installation of a second battery could actually justify denial of warranty on any and all electronics in the vehicle. The battery controller manufacturer might not necessarily have designed the thing right which can cause all kinds of problems.