Poach chicken: Put onions, garlic, salt, and 4 cups water in a large pot and bring to a boil. Add chicken and bay leaves and lower heat to a simmer. Cook chicken, partly covered, until no longer pink inside, 20 to 25 minutes (cut to check).
Let chicken cool until cool enough to handle. Tear into bite-size shreds, discarding skin, and put meat in a bowl.
Make salsa: Meanwhile, transfer 1 cup broth from pot to a container (leave onion and garlic in pot). Remove bay leaf. Add tomatillos and chiles to pot and cook, covered, over medium heat until tomatillos are soft and olive green, 10 to 12 minutes.
Drain tomatillo mixture (save broth, along with the 1 cup broth from step 3, for making tamale dough if you like). Transfer tomatillo mixture to a blender. Add cilantro, 1 tsp. salt, and 1/4 tsp. pepper and whirl until smooth.
Pour salsa into a medium saucepan and bring to a simmer. Add chicken and simmer to meld flavors, about 5 minutes. Season to taste with salt and pepper.
Make ahead: Up to 2 days, chilled.