Do the Scouts really teach that? Not that it makes a difference one way or the other.
I do not have the actual Hiking Merit Badge booklet, but the requirements are as listed below. I found several references on Boy Scout websites that seem to indicate that, yes, they are taught not to hike alone.
Hiking Requirements
1. Show that you know first aid for injuries or illnesses that could occur while hiking, including hypothermia, heatstroke, heat exhaustion, frostbite, dehydration, sunburn, sprained ankle, insect stings, tick bites, snakebite, blisters, hyperventilation, and altitude sickness.
2. Explain and, where possible, show the points of good hiking practices. including the principles of Leave No Trace, hiking safety in the daytime and at night, courtesy to others, choice of footwear, and proper care of feet and footwear.
3. Explain how hiking is an aerobic activity. Develop a plan for conditioning yourself for 10-mile hikes, and describe how you will increase your fitness for longer hikes.
4. Make a written plan for a 10-mile hike, including map routes, a clothing and equipment list, and a list of items for a trail lunch.
5. Take five hikes, each on a different day, and each of at least ten continuous miles. Prepare a hike plan for each hike.*
6. Take a hike of 20 continuous miles in one day following a hike plan you have prepared.*
After each of the hikes (or during each hike if on one continuous "trek") in requirements 5 and 6, write a short report of your experience. Give dates and descriptions of routes covered, the weather, and interesting things you saw. Share this report with your merit badge counselor.