To reproduce, comment out the "Rules::$purgeDisabledByTests = true;" line in UITest.php.
UITest will launch archiving for a year period. This will launch archiving for each month. Archiving finishes successfully and archive data for months with visited is present in the database. Then ArchiveSelector::purgeOutdatedArchives is called which deletes the new archive data. When year archiving continues, Piwik can't find the archive data for each month (since it was deleted), so it says there is no data.
In 6980299: Fixes #4382, purge outdated archives after current archive is finalized.
Fixes #4382, purge outdated archives after current archive is finalized.