A layer 3 switch doesn’t have any interface to connect for example a DSL or dedicated link.
This type of connection (to internet or wan) needs a specific port to connect them to. (an embedded modem, clock to sync data transmition, etc)
The routing capabilities of a layer 3 switch are used to treat traffic on layer 3 – Network layer, beyond layer 2 commonly used by all common switches.
The capability to connect directly to an ISP with a L3 switch comes down to which model of switch you’re using…
Saturno is correct in saying that typically, most L3 switches cant support a WAN connection. However, some can – the Cisco 6500 series can include GigEthernet / Fiber Optic GBICs that cna be run to an ISP. Other WAN interface modules can also be added to these devices.
To answer the question more directly, even though you can perform routing with a L3 switch, they typically dont provide some of the same services (VPN concentration for example) that routers can. Or, the company/client needs are simple and dont require 24-48 ports, so a simple router to a low-level switch is more than sufficient…