到 here is a result complement indicating success. 闻 alone means 'to sniff/smell,' while 闻到 means you actually detected the scent. Compare: 听到 (heard), 看到 (saw).
history
In classical Chinese, 闻 originally meant 'to hear' (as in 新闻 xīnwén, 'news'). The meaning shifted to 'smell' in modern usage, though both senses survive.