There are many reasons why dogs act aggressively. It may be afraid or its space has been violated. It may feel that it needs to protect its master