Why is there SQS in front of Lambda in this architecture diagram?

I am trying to learn how to build scalable serverless applications. I was following [this blog post]( Building a location-based, scalable, serverless web app – part 2 | AWS Compute Blog (amazon.com)) by AWS. I am at a loss to understand the utility of SQS in front of lambda. I also don’t know why we don’t have lambda directly store in DynamoDB. Can someone please help me understand?