Well, yes, they ARE making it up as they go along. The universe didn't come with a handbook. Scientists have to try an infer the rules by observing the behaviors. At any given point, the sum total of all scientific theories still just amounts to "the best we've come up with so far."
There is no shame in not knowing why our models don't match our observations. Solving those mysteries is an ongoing effort, and it requires brilliance as well as data (and is in fact impossible to do if key data haven't been discovered yet). So, the "best we can do so far" models need placeholders for the things that don't line up.
The plan has always been to get rid of "Dark Matter" and "Dark Energy" once we figure out what's really going on.