There are some risks to re-selling many items, but there is no blanket “illegality.” You would be entering what some call the “grey market.” Google “grey market,” and you will probably find even more information than I have included here.
The primary issue is that if you are selling something that requires governmental labeling, you cannot alter the label or the contents described on the label. Also, some things that are not labeled for individual purchase would require that an appropriate label be affixed. If you plan on altering the item in any way, you should consult with an attorney to ensure that you are not violating the law in relabeling the product.
Next, you may have some issues if you are selling a store-branded product as new. The stores typically own the trademarks of their store branded goods (like the Stafford brand at Penney's). If the goods are only sold in their stores, then you might be violating their trademark rights. You should be sure that the brand you are trying to resell is not a store brand or “private label”.
Finally, another tricky issue is the potential for tortious interference with a contract. Because sometimes a name brand designer will create a product for the sole use of a particular store, your purchase of a bunch of these things at a teaser discount and then reselling them might open you up to liability for interfering with that contract. There is really no way to know for sure whether a store has an exclusive contract with another store (sometimes these could be limited to a specific location or time of year, too), so anything you buy has the potential to create some risk unless the exact same thing is available at another store at the same time in the same community. Trademark issues might arise in this instance, too, if the manufacturer believes that your sale of their products is diminishing the value of their brand.
I am sure there are other issues, too, but these are the ones that came to me right off the top of my head.