Raspbian uses dhcpcd to manage networks. Despite the name this does more than allocate addresses; it can actively switch between networks and interfaces, and repair broken connections. /etc/network/interfaces uses wpasupplicant to provide details of known wireless networks (and other optional settings). (dhcpcd can directly call wpasupplicant, but Raspbian Jessie omitted the hook to do this, although this is included in Stretch and Buster.)
See:-
How do I set up networking/WiFi/Static IP
etc/network/interfaces is used by used by ifup and ifdown.
It can be used to provide a simple static setup, which can be managed manually. The default works with dhcpcd and wpasupplicant.
One disadvantage of putting wireless settings in interfaces (apart from lack of flexibility) is that any user can read password.
That's actually wrong, you can use
– eXa Sep 11 '18 at 06:59wpa_supplicant ssid passwordand use the generated password in the interface by setting it withwpa-psk.wpa_passphrase? – schemacs Sep 15 '19 at 13:07