Well AKAIK - in Magento 2 controller is mainly used for routing purpose - meaning to route the actual path and call the specific methods !
Controllers are responsible for processing all requests made via a url. If you hit the url yourwebsitedomain.com/index.php/mycustom/test - so in the controllers/mycustom/test.php and inside of that the viewAction() method called