As you know, Earth is not flat, but is rather close to a sphere.
So "the shortest path between two points is a straight line" does not actually work. The straight line between those two points would go through the Earth, which is quite challenging for most aircraft (!).
The shortest path between two points on a sphere is called the "great circle route". It's the intersection of a plane going through the centre of the sphere and the two points with the surface of the sphere.
Now, mapping a sphere to a flat surface is quite a challenge. Take a soccer ball, cut it in half, and try to lay it fully flat. Good luck. Or try to wrap a basketball with a sheet of paper without any wrinkles or tears. Not going to happen.
There are many different ways of doing that (called projections), which all have different properties, usually trying to conserve either distances or areas or angles, but never all of them at the same time (even though lots of people have tried and some maps are really funky. Just think about the poles: meridians on a sphere all converge to a single point (the pole), while meridians on many maps (and definitely on those you are used to, which use the Mercator or Web Mercator projections like the ones in your exemples) are parallel.
This distorts the representation of the route on the map.
Here's an example, generated with the Great circle mapper.
Your first route is roughly LAX to KEF. If you use an orthographic projection it does look like a straight line:

The exact same route, drawn using a rectangular projection, does look curved:

If you look at the points it goes through (e.g. intersections with state or US/CA boundaries or coastlines), you'll see that it's the exact same route, just viewed differently. You'll also see that it's quite close to the route on FR24. The remaining differences may come from:
- Trying to take advantage of the jet stream (a high-altitude wind which flows west-to-east around those latitudes, which changes a bit all the time, and which can save a lot of time and fuel if you manage to get "pushed" by it as much as possible), or, the other way around, trying to avoid it.
- Following navigation routes: like you follow roads to go from one place to another, aircraft follow pre-established routes from one waypoint to the next).
- Avoiding other aircraft (this is actually one of the main goals of the navigation routes above).
- Avoiding bad weather.
- In some cases, especially transoceanic routes, making sure the aircraft is never too far from a diversion airport, though nowadays even a twin-engine aircraft can fly quite far from one, see ETOPS.
- For some routes, avoiding the airpace of some countries, due to local conflicts (aircraft usually don't like flying over war zones which have a risk of stray missiles), or other geopolitical reasons.
A few more examples of routes which are straight but don't like they are:
JFK-SYD:
Note how it looks like it curves one way then the other. The inflexion point is over the equator.
KEF-SYD:
Yes, it is straight, going over the pole:
