Because there is a limited amount of genes that are responsible for height/size/weight of an animal and the presence of these genes in the genome of an animal isn't really connected to the amount of genes that are present in that genome. For that reason, a big animal can have the same amount of genes as a small animal does.