I'm aware that the only required files for creating a module are registration.php and module.xml. But I'm seeing some of the popular blogs mentioning composer.json file in addition to the above. Any suggestions?
I would like only to highlight that magento uses the word "recommended" regarding composer.json file (https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/composer-integration.html). May look a little confusing since many resources consider this file required. It is indeed required if we need to manage the module using composer.
composer.json file is also required for listing module's hard dependencies per magento architecture documentation at https://devdocs.magento.com/guides/v2.3/architecture/archi_perspectives/components/modules/mod_depend.html. Consequently this file is required in order to prevent installation and enabling one module while hard dependencies are missing.
composer.json used to register your package in magento module listing. It also useful to restriction module php versions and required modules(depend modules) for current module. Many more use are here. https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/composer-integration.html