As far as I can remember, Apple has always charged for Xcode 4 in Snow Leopard (the version released with Snow Leopard was 3.2.x) - there was some argument at the time about it most likely being due to Xcode 4 providing new functionality that was not part of the advertised package at the time Snow Leopard was released and an overly strict interpretation of Sarbanes-Oxley. The original developer preview was available in the AppStore (with people howling about paying $5), but when Lion was released it was removed and can now only be accessed via a paid developer program. The version of Xcode written for any given version of OS X has otherwise been free (well, it is included in the cost of the OS anyway).