No. You don't have to, but roasting the garlic brings out its sweetness which I think really elevates this dish. But you can definitely just cook it in the pan, see recipe notes.