Most common electrical or electronic products are sold (in the U.S.) without batteries, if the item uses any of the standard U.S. sizes (AAA, AA, C, D, or 9-volt). Thus the phrase "Batteries not included" was once a standard catchphrase in television commercials (and on packaging) for toys and games up until the early 2000s, to indicate to parents that they needed to purchase batteries for the toy. This was generally because the manufacturer was too cheap to spend a few extra cents on batteries.
Historically, there was also a concern with the corrosion that could occur if a standard battery (especially the more corrosive zinc-carbon-chloride batteries that were common before alkaline batteries took over in the 1980s) was left installed too long, potentially damaging or ruining the product. This problem can be partially solved by breaking the circuit with a tiny plastic strip placed between the battery and the item contact, which would be removed after purchase. Another solution involves packaging the batteries separately, often in a tight-fitting plastic shrink-wrap, and is a standard practice with appliance remote controls. Further, if the device uses a non-standard size or a rechargeable battery, or if the batteries are not intended to be user serviced (as with many modern portable electronic devices such as smartphones), it will usually be packaged with the battery. Also, before the widespread adoption of lithium-ion batteries, devices that used disposable batteries were notorious for draining the batteries quickly, a problem that was especially bad on motorized toys (which often called for the larger, harder-to-find C-size and D-size batteries to compensate) and early digital cameras (which often required expensive lithium-iron sulfide batteries to keep up with the current draw, since batteries physically larger than AA-size were too big and heavy), and many devices also expected the full 1.5 volts a disposable battery could provide, which made using nickel-cadmium or nickel-metal hydride batteries (with their lower per-cell voltage of 1.2 volts) problematic, often leading to false "low battery" indications.
You may find weird situations, such as R/C helicopters, where the helicopter has a small battery inside it that is charged by plugging a wire into the wireless control to recharge it, then disconnect the wire once the helicopter is charged in order to fly it, but the wireless controller does not include the batteries that are required to operate it or to charge the helicopter.
While this rule of not including batteries often applies to most small consumer electronic appliances, more and more children's toys are packaged with a "demo" or "Attract Mode" that allows kids to play with them in the store, making it more likely that they'll beg their parents to make the purchase. Naturally, such toys get played with enough that the manufacturer's batteries are frequently drained by the time they actually make it home, fulfilling the trope in effect if not by definition. Also, the included "manufacturer" batteries (with some exceptions like Panasonic) are typically cheap generics, often using the older and cheaper zinc-carbon-chloride chemistry mentioned earlier, that don't last as long as a brand name anyway. There are also some minor issues where shipments of items with batteries in them may cost more to distribute due to hazardous materials laws, though after 2010 this has been part of the cost of doing business due to the sheer number of modern devices that include lithium-ion batteries (which can be a fire hazard if damaged or abused).
A related practice involves the cables associated with consumer printers. Even back when parallel cables were used instead of USB, they were always a separate purchase despite being standardized; nowadays USB is even more of a standard but manufacturers make you shell out the extra $5-20 for a store-packaged cable instead of the $1 or less it would cost to put one in the box. Part of the thinking is that you will still have the cable you used with the previous printer or USB device, assuming this isn't the first one you've acquired. This has also started to become common with recent devices that use USB chargers, as it's assumed the purchaser already has at least one they aren't currently using for something else due to how ubiquitous they have become.
Not to be confused with *batteries not included (1987), the Steven Spielberg movie from the 1980s, or Toy Terror: Batteries Included, the Give Yourself Goosebumps book.
