Can't Tesla Powerwall 2 draw DC from solar panels directly?
Even though both battery and panels are DC, they can't be (efficiently) connected directly. For optimal efficiency, solar panels need to be loaded at an optimal point, varying current drawn and thereby output voltage (this is called Maximum Power Point Tracking or MPPT). It basically ensure maximum power by maximising IxV (=P).  

The battery will require a different current and voltage, optimised for efficient charging, battery life, etc.
At such, the hybrid inverter will need to do three things:  


Do MPPT for the solar panels   
Provide charge control for the battery
Provide AC voltage to the house/grid


Lastly, the inverter will somehow 'switch' (or balance) between drawing power from the panel and from the battery, and might even charge the battery from the grid when it's empty and there no or not enough sun (not sure about this).