Well it should return to home the when the battery gets low. If I were you I would start a claim with DJI and upload your logs to them. The worst they could say is it's your fault, and at best you get a new spark.
One of the following likely occurred 20 seconds after your mobile device disconnected from the Spark:
Your Spark attempted to return home and crashed into an obstacle on the way back
Your Spark attempted to return home, reached the critically low battery level at some point on the way back, and auto landed at its current location
Your Spark was flying in ATTI mode and auto landed at its current location
Your Spark was not able to fly back home because it was being pushed away by strong winds, it continued to be pushed away until the battery reached the critically low level, and then finally auto landed at its current location when the battery reached the critically low level