What is the purpose of AssumeRolePolicyDocument in IAM?
The purpose of the AssumeRolePolicyDocument is to contain the trust relationship policy that grants an entity permission to assume the role.
In your example it's granting the Lambda service the ability to assume
References
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
https://docs.aws.amazon.com/cli/latest/reference/iam/create-role.html