It is generally NOT okay to have a 20A circuit breaker on a circuit that has any 14 gauge wire -- and most homeowners won't run into the exceptions
If there's any #14 wire anywhere downstream, you must use a 15A breaker to protect that wire. It's about fire prevention. #14 wire is rated for 15A. Sure, it will carry more, but the N.E.C. ampacity ratings take into account the resistance of the wire insulation to heat and other factors. Bottom line, #14 wire equals 15A breaker.
It's fine (or even required) to oversize the conductors, but not to oversize the breaker (except under rare circumstances that you'll never need to know about unless you become a licensed electrician or wind up doing funny things with motors that invoke Article 430). #12 wire on a 15A breaker is fine. The wire is protected. For longer runs, for example using #12 wire on a 15A breaker or #10 wire on a 20A breaker will reduce voltage drop. There are calculations for wire size related to voltage drop over distance that tell you when you need bigger conductors.
Why was this done?
Hazarding a guess, the person who did it might have had some #14 Romex lying around the garage. Maybe they didn't want to run out and buy some #12, or felt they couldn't afford it. Maybe they bought #14 on purpose just because it was cheaper and they didn't understand the requirements. Or maybe they reasoned that it was okay since the only load on those #14 wires would be the lights, which would never draw more than about an Amp per fixture. That's true enough, technically speaking, as long as nothing ever goes wrong, but it still illegal (actually illegal, because it violates the N.E.C. rules).
But stuff does go wrong, so you never intentionally create a situation that has the potential to start fires or electrocute people.
A few (far from exhaustive) examples of things that could go wrong include; somebody comes along and replaces one of those fixtures with a bigger fixture, or with one of those fixtures with a receptacle on it, or adds a convenient receptacle elsewhere on the 14 gauge stretch of the same circuit, or both. Or something goes wrong with one of the light fixtures that causes it to steadily draw more current than it was meant to, and all of a sudden you have a circuit breaker that will happily feed 20A onto #14 wire for long periods of time.
The short answer is that the breaker protects the wire (otherwise, heat and fire can result). You can put a 20A breaker on a circuit if all the wire on the circuit is #12. If any of the wire is #14 you can put a 15A breaker on it. If any of the wire in the circuit is smaller than #14, then you cannot put a 15A breaker on it.
Best Answer
This is a fairly "common" issue, that typically occurs due to high resistance at the terminal. The high resistance can be caused by corrosion, or a loose connection. The high resistance causes heating, which causes higher resistance, which leads to more heating. Eventually the insulation on the wire starts to melt, and/or burn. Usually the heat will transfer through the terminal block, and into the smaller wiring in the stove. When the heat becomes too much, the smaller appliance wiring will fail and open the circuit.
In most cases this is not a super dangerous event, as the wiring is contained within the stove. However, there is a chance that this can lead to a fire in the house, especially if the cover is not properly installed.
Causes
Corrosion
Corrosion is more commonly a problem if the wiring is aluminium, though can still be a problem with copper wiring. Because stoves/cooktops/ranges draw large amounts of current, there is typically some heating of the wiring during operation. The constant heating and cooling cycles of the wiring can lead to corrosion, and/or hardening of the wiring over time. This corrosion and/or hardening increases the resistance of the wiring, which cause the heating to be worse.
Solution
Occasional inspection of the terminal block and wiring, can prevent the corrosion/hardening from getting too bad. If you notice any discoloration or corrosion, have the cord replaced. There are also conductive pastes available, that can be applied to the wiring and terminals to help prevent corrosion. While this should always be used with aluminium wiring, it may also be applied to copper wiring.
Loose Connections
This can be caused initially by not tightening the terminals to the proper torque (usually specified by the manufacturer), or over time by heating/cooling cycles. Loose or bad connections can cause arcing and/or higher resistance. As discussed before, high resistance leads to heat.
Solution
Make sure all terminals are tightened to the manufacturers specifications. It's also a good idea to tighten the terminals after a few hours of operation. As stated before, occasional inspection can also prevent this situation.
Why didn't the breaker trip?
The heating was localized to the stove\cooktop\range, so the thermal protection in the breaker would not trip. Since stoves\cooktops\ranges draw large amounts of current during normal operation, the current during the event likely didn't go high enough to cause heating in the breaker to trigger the thermal protection. It could also be that the breaker is faulty, so it should be inspected.
Is the stove scrap?
The stove may be salvageable, though you'll want to thoroughly inspect all the wiring to insure it is not damaged. Replace any damaged wiring with equivalent parts (cooking appliances use high heat resistant wiring).
If the stove is still under warranty, you'll want to contact the manufacturer to discuss your options.