Some pets genuinely do have a preference for sleeping outside. If that is the case for your pet, then there's nothing wrong with them sleeping in the garden.
In any case, many dogs will feel sad if they are not allowed to sleep inside with their family. This distress can cause them to bark at night in protest if they are forced to sleep outside. This, of course, can be very annoying to your neighbours. So we recommend that for their health and happiness, and your and your neighbour's happiness, it's best for you to have your dog to sleep indoors with you.