The slab settled from the sub-base not being properly compacted prior to pouring. To fix proper you should remove the portions of slab that have irregularly settled and pour a new slab up to the proper level.
The part of concrete directly along the wall is your foundation wall. They used the wall itself as the pour stop for the floor.
I agree with this part, it's simply a construction joint, with the foundation wall/weight bearing curb on the outside, and the interior floor on the inside, obviously poured at separate times.
Poor soil preparation and compaction has caused the slab to settle.
Maybe my eyes or reading comprehension are going, but I have no idea where you keep coming up this this assumption that there's any settlement.......
As said before you can either use self-leveling compound to infill or remove and replace the slab making sure to prep the sub-base proper the second time around.
If there is a crawl space below this and the crack has a significant vertical change, then call a structural engineer to review for potential structural defficiencies. If there is a cral space and the crack has no vertical change then is from the floor deflection fighting against the rigid wall and causing a crack at the fulcrum point.