The ATMega on the HM board is a mini-computer in it's own right.
It does the measurement, fan % calculation, PID control etc. It sends data to the RasPi, which then does the graphing, webpage server etc.
When you 'flash', you overwrite the OS on the ATMega AVR by sending info from the RasPi...