Amazon recored its first quarterly loss since 2015. The darling of the pandemic can trace the loss to its investment in an electric vehicle start-up and people going back to stores.