The video below is a short overview of how to make a traditional (hot) compost pile. This is different than a worm bin, but often confused.
If your goal is to have a compost pile in the backyard, your objective is to build a pile that creates temperatures where heat loving beneficial bacteria thrive (thermophilic bacteria- which inhabit compost piles with an approximate heat of 100 F to 160 F).
Most backyard piles fail to achieve this heat, and instead range in the 80-110 F range. This is where the confusion begins, and why you find worms in the coolest spots of that “not so hot” hot compost pile. (Worms can only handle temperatures up to about 85 F.) Heat is important because most backyard compost piles have weeds with seeds- or plants with disease- the heat kills the seeds and most diseased material. Essentially, you have some roving worms in the backyard if your compost pile is freshly built but not hot enough.
Watch this video if your goal is to achieve an efficient compost pile recipe. As the compost nears its end of decomposition, the pile cools and worms enter the picture to further work the material. In other words, worms finish the compost pile.
By contrast, the goal of a worm bin is to create a captive audience/population that will stick around and is robust enough to consume a steady and constant supply of food. You control the process and have a predictable idea of how much you can feed them, and you get a concentration of worm castings in the end. A compost pile full of worms is hosting a migrant population of worms that will move in and out. You wont be able to control the population size of the worms, predict how much food you can supply on a steady basis, and you lose the concentration of worm castings in your finished compost.