Why is there always a fire truck present before refuelling?
As far as I know it is not mandated, but ICAO (for which many aviation authorities derive their regulations) states in Annex 14 Section 9.6 Ground servicing of aircraft:


  9.6.1 Fire extinguishing equipment suitable for
  at least initial intervention in the event of a fuel
  fire and personnel trained in its use shall be
  readily available during the ground servicing of
  an aircraft, and there shall be a means of
  quickly summoning the rescue and fire fighting service in the event
  of a fire or major fuel spill.


and


  9.6.2 When aircraft refuelling operations take
  place while passengers are embarking, on
  board or disembarking, ground equipment shall
  be positioned so as to allow:
   a) the use of a sufficient number of exits for
  expeditious evacuation; and
  b) a ready escape route from each of the exits
  to be used in an emergency


So you've probably been more aware of this if you were actually on the aircraft as it is being refuelled.