Why can't I sync music with a lock icon?
The padlock icon indicates that the song has been protected by Digital Rights Management (DRM).Prior to 2009, songs that were purchased from the iTunes Store were protected by DRM, which limits playback to "authorized" devices. The iTunes Store has since converted to a DRM-free model and you can upgrade previously purchased songs to be non-DRM using a subscription to iTunes Match ($24.99/year).
Apple's page on iTunes Match is here.