SPWeb.Groups only includes Groups that have permissions. SPWeb.SiteGroups includes all.

And another reminder: SPWeb.Groups only includes Groups that have permission to any object in the SPWeb.

If you want to create a Group that merely serves as a Container for Users, it will not show up in SPWeb.Groups, and calls to Groups.GetById() will fail. If you do not want to add some dummy permissions, use SPWeb.SiteGroups instead, which contains all groups in the Site Collection.