Bug is nothing but a deviation from the requirement. A bug is created due to
- No solid requirements
- Misinterpretation of the requirements
- Miscommunication or lack of communication among the team members
- Sudden change of requirements
- Change of requirements often.
- Inadequate knowledge in programming or in testing
- Unrealistic schedule
- Unrealistic goal to reach or no goal to reach
- Improper planning of the project.
- Team member playing more than one role or not playing their role.