Stannis always resented being given Dragonstone while Renly got Storm's End, and took that as a slight... but it's not necessarily true that Robert meant it that way. The Targaryen heir apparent had always been titled Prince of Dragonstone. By making Stannis the Lord of Dragonstone, Robert affirmed his brother's status as heir (which he was, until Joff's birth a few years later). Robert could just as lawfully retained both castles for his sons, and made Joffrey the Prince of Dragonstone and Tommen the Lord of Storm's End. Giving them to his brothers instead was another instance of his great, but rather careless, generosity.