Often, but far from always, the aim is to replicate the behavior of an ideal component, at least over some range of frequency, voltage, temperature, whatever.
Sometimes, however, manufacturers intentionally stray away from the ideal because a certain degree of "non-ideal" behavior is desirable for the typical application of a component. Consider bypass/decoupling capacitors. If you have worked for long in electronics, you know of the need for capacitance between the power and ground of your circuit.
For example, from a manufacturer's perspective, TDK has a line of controlled-ESR ceramic capacitors intended for power supply bypassing/decoupling. Although an ideal capacitor has zero equivalent series resistance, the ESR of these capacitors is intentionally moderate. Indeed, they have actually spent more money on each component in order to raise the ESR, and thus the cap is even further from the supposed ideal than their other MLCC caps. If you have ever designed or specified the performance of a power distribution system, you'll know that too high ESR means your bypass caps are not effective, but too low of an ESR can create resonances in your power system, increasing voltage ripple. MLCCs often have problematically low ESR, so TDK is trying to make components which solve this problem.
From the perspective of an engineer applying bypass caps, it's better to choose lossy ones (e.g. X5R, X7R dielectrics) than the high-Q C0G types: your power system will have less ripple. Were you making an RF filter, maybe the high-Q caps would be a better tradeoff.
So sometimes components are intentionally non-ideal because that's what's best for the typical application circuit. I have found it best to understand the types of non-ideal behavior exhibited by particular components and try to "design it in" to the circuit.