They were going to have to fight him at some point. How else would they stop demons from appearing? Muzan had killed hundreds, no, thousands of people. Tanjiro wanted revenge for his family, and wanted no one to feel the same. So, killing Muzan was going going to happen either way. Also, have you even read the full manga?? The Muzan fight wasn't the end.