Not mandatory. You can file the patent on your own. However, USPTO recommends taking the help of a patent attorney to make the process easy for the applicant because the patent attorney understands the legal terms. Thereby, he/she can prepare a patent application effectively for which you might need many days preparing. So, it's all up to you whether to employ the patent Attorney or not.