It isn't that surprising that it works well, this problem is fairly well known and some simple heat equations would lead to the result, about which there is a lot of training data online.