It depends on how bad the infection was or what was the reason for root canal treatment. If the root canal was done due for intentional reasons also known as prophylactic root canal then you do not need antibiotics. If it was done for inflammation within the nerve of the tooth and if it was not spread to the underlying bone or soft tissues then you do not need antibiotics. If you had the infection spreading to the bone and soft tissues and/or if you have other health concerns like diabetes, or any other disease that compromised your immunity then your dentist would usually prescribe an antibiotic.
Hope this helps.