It can take up to 8 minutes for the device to determine that the trip has ended. The sensors and algorithms need to use that timeframe to determine that a trip has ended.
The process of recognition of a trip end occurs when the app detects a few things, such as the device not moving for a certain period of time and the device actually leaving the vehicle.
The app is deliberatley set up to not end a trip immediately. This is for situations such as delivery drivers. A driver might get out of car to make a quick stop for delivery, then 60 seconds later will get into car to continue their journey. Even though the driver stopped for 60 seconds, this should still be considered one trip.