The pilot in command can refuse an aircraft because of unresolved mechanical or technical issues, and sometimes issues that for example are fine on a clear calm day can just not be in weather. Remember that the pilots themselves are responsible for the safety of the aircraft and all passengers for the duration of the flight, so it's up to their judgement to make sure that a flight is safe.
But a fire on a plane is pretty much the most dangerous event you can have on a flight. Especially lithium battery fires since aircraft don't have the right extinguisher for them, and staff are generally trained to quarantine the fire just long enough so it can be taken care of on the ground.