To start, why do sales organizations exist at tech companies? Customers want direct help when deciding whether or not to pay for a product or not, proportional to the price of the service. For example, you and I would never feel the need to speak to someone at Twitter before creating an account—it's free, so we just do it without talking to anyone from Twitter about it. But when companies are deciding whether or not to pay for the service, they need to talk to a salesperson to determine: Is this service worth the cost? Is it secure? Will this allow us to spend more time creating value for our customers? Etc.
But for technical products, you can't throw a non-technical salesperson into the weeds and expect them to thrive. They will be interfacing directly with engineers, engineering managers, the VP of engineering, etc., and if they can't explain the product and deflect technical questions from these parties, that's a problem.
This is where the sales engineer fills the gap. A sales engineer is typically someone who used to be a full-time engineer who now focuses on selling to customers. They might write code once in a while (like if they promised a feature for a deal they just closed), but most of their time is spent interfacing with customers who haven't paid yet.