Of course it would cost less to buy the kit. Why buy the kit if it's the same/cheaper to buy everything individually.
Although quite a small one, a recipe kit is still a 'bulk sale' in that they're selling several things where they may not necessarily if it was not available, especially when recipe formulation is a more advanced element of homebrewing. These are also food stuffs with a shelf life so a faster turn over is always better, sometimes at the expense of profit margins.
Aand just because a kit is cheaper than the individual components doesn't mean they're losing money.. That would assume they're not making ANY money on the items independently. They're making less when selling the kit vs. independent ingredients, but they may not have sold anything at all if the discount was enough to sway a sale. It also allows for continued sales if buyers enjoy the recipe.