Why do Japanese ambulances belong to the fire department?

According to the Japanese, because fire engines are not used every day, there will not be so many fires every day. So using idle fire engines as ambulances can save a lot of money, because ambulances are free in Japan. But it is not firefighters who save people in ambulances, but regular emergency personnel with medical knowledge.