Fax machines have phones because they are connected to a phone line. The phone handset on the fax machine is a way to access the phone line.
A phone attached to a fax machine works the same way as a regular phone. You can dial calls out by pressing the keypad the same way as a regular phone. If the fax machine rings, you can pick up the handset to answer the call (this might result in the fax not receiving).
Question: Do all fax machines have phones?
Answer: No, many do not. Phones are associated with older fax machines.
Question: Can you attach a phone to a fax machine (or fax modem)?