During my years working with Cisco equipment I realised that switches have more VTY lines (16) as compared to routers which have 5 VTY lines considering that the equipment that we work with (c2960 switches and 1941 routers) the routers have more memory than the switch. What is the logical explanation for this?
Your premise is not necessarily true.
Some Cisco routers do have VTY lines 0 to 15, and some older Cisco switches only have VTY lines 0 to 4. As far as I know, you can configure
line vty 0 15 on a Cisco 1941 router. It won't show lines 5 to 15 unless you actually configure them. I don't have direct experience with the 1941, but every ISR G2 router that I have touched, including the 1921, can configure VTY lines 0 to 15. If you can't on your 1941, it may be a software version thing.
Routers generally have more memory because they need it. Routing processes, routing protocol tables, routing tables, access lists, route maps, NAT tables, ARP cache, routing buffers, QoS policies, etc. tend to eat up a lot of RAM, while switches primarily need it for the MAC address table. On the other hand, there are large Cisco switches which can have a lot of memory, but they tend to be layer-3 switches which perform routing functions, too.