To be able to use IAM role. This is useful for EC2 users so that we don't need anymore to create users to have acccess and secret keys. The IAM role is assignated to the EC2 instance and automatically rotate the keys, and allow to have an access to various AWS resources like CloudFront (http://aws.typepad.com/aws/2012/06/iam-roles-for-ec2-instances-simplified-secure-access-to-aws-service-apis-from-ec2.html).
But well, this may be hard to implement if you are not using the official AWS SDK (otherwise it's built-in directly).