Yes, because trademarks are only protected within their registered classes. If an infringement happened outside of those two classes, e.g., if you were a mineral water distributor, but a software company started using a confusingly similar brand name, that would fall outside the scope of your protection.
Narrowing your goods and services may or may not be the right move, depending on what you want to narrow. Dropping classes the brand does not and will not use makes sense, as it reduces costs and opposition risk without losing meaningful protection. But dropping classes that cover real business activity creates coverage gaps where infringement may realistically happen.