Why is interest earned on a roth ira distributed in 2018 taxed as 2017 income? I thought individuals were taxed on a cash basis.

Roth contribution in 2017 for 2017. Income exceeded max.  Withdrew contribution and interest in 2018.  Turbo says interest is 2017 income???