From Strava Support:
The Power Curve shows your best average power for time periods of 1 second up to the length of your ride. We search your entire ride and find these best efforts and you can compare them with your best efforts for your last 6 weeks, the current year, years in the past, or all-time!
-- Using your Best Efforts Power Curve (Summit)

As you are already aware, your critical power (CP) is the maximal power you can sustain without fatigue for a very long period of time. CP is also sometimes defined as the maximal power produced over a finite time period (e.g., CP30 would be the maximal power you can sustain for 30 minutes). The Strava power curve therefore gives a variety of CP values across an array of duration intervals.
In the past might have been done with lab experiments (e.g., you warm up, then do a maximal effort on a bike ergometer or on a power meter equipped bike for a series of set durations), where you would then infer intermediate points based on some type of interpolation or statistical model (e.g., Monod-Scherrer).
With continuous performance tracking (i.e., bike computer + power meter) this can be done empirically by querying all data within a ride or over a period of time (e.g., last 6 weeks) to determine the maximal power over a set of differing time intervals. These independent queries are then used to build the power curve displayed.
The Strava Power curve, is therefore an empirical curve based on cherry picking your best efforts for a series of durations, dependent on context (i.e., current ride or past effort(s)).
If you never put in a hard effort for a given duration in your ride, or in the past, then the empirical curve will underrepresent (i.e., biased low) your actualized potential if you were to do a real maximal effort. That said, if you didn't put in an maximal effort over a given duration (e.g., a 5 minute interval) you will clearly see it in the power curve associated with the ride, as the curve at the 5 minute mark will be lower than your historical best.
What About Statistical Model Fitting?
Another possible way to generate the curve is to assume that the true power curve of the athlete (what you would like to estimate) follows a particular mathematical form (i.e., parametric) and estimate the parameters associated with that mathematical curve based on your observed values and some sort of objective function (i.e., likelihood). The problem with this approach is that you have to get the form of the latent curve correct, which can be difficult as people do not have uniform abilities across differing timescales.
For example, some athletes may have very strong short-duration power (e.g., 30 second CP), but lousy long-duration (e.g., CP60, otherwise known as functional power threshold [FTP]). As such correct form of the parametric curve will depend on the athlete, making a generalized fit routine problematic.
There are of course other alternatives that are more flexible with regards to the shape of the curve. Some of these include fitting splines, general additive models, or kernal smoothing. These are all computationally expensive and come with their own set of assumptions and drawbacks.
Given the volume of available data, an empirically based curve is simpler and likely more robust. You typically start fitting parametric statistical models when you are more data starved and each individual data point is more trustworthy.