Now there is a furor inside and outside of Iran. And some people now want their leader to step down. They could deny it forever. Now they having such backlash. Did they make it to put fault on US (because they freaked them out), does it outweigh the backlash? Interesting that nobody thought it's good idea (to recognize fault) regarding MH17 brought down over Ukraine.
Iran depends a lot on the international community in its struggle against the US' maximum pressure campaign. The US is rather isolated in its anti-Iran campaign due to having left the nuclear deal, so it would likely jump on Iran's denials in the face of overwhelming evidence to get to an anti-Iran coalition for this specific issue. By taking responsibility for the disaster, Iran can deny the US this opportunity.