I will go into details what the "dpi" actually means, by examples;
with that, you may just see the answer yourself.:
In short, your image consists of dots of colour, which are next to each other. But the do not have size in any physical sense.
Now, when you show an image on a screen, you will normally just put the dot colors of the image into the raster of colored rectangles that your screen can display. Note that both, what I call "dots" and rectangles here, are called "pixels" - but looking closely they are something different.
If we display an image in this natural way on a screen, we can measure it's size.
For example, our image is 500 dots wide, we put these into colored rectangles on the screen, and see it is 5 inches wide. Then, we have 100 rectangles per inch, showing 100 of our dots per inch.
That is, our image has 100dpi on the screen.
But we did not even look at the dpi value in our image file!
Now, if we look at our file, it may well say the image is 200dpi!
The dpi value is about how many color dots are visible per inch of screen width or height. So, the dpi value in the image is telling us that our image will be 2.5 inches wide when displayed - as a promise, not as a fact.
When we assigned the image dots to the screen, we did not even care about that, because we just displayed it, and measured the actual, physical dpi of the screen representation of the image.
So, as you see, the promise was just plain wrong. And nobody cares! Because it's just not relevant.
The file was promising - by saying 200dpi - it will "2.5 inches wide when shown" .
Then, we used a screen that was showing it as 5 inches wide - we can know that because we know what the actual screen is.
Normally we do not even know what the end user will use as display, so we can guess only anyway,
So, now it makes sense:
- We did not know the dpi the images, shown on a screen, will have, because we did not know the screen.
- But we had an idea how it should look like, "roughly this size... ok, then we need about 200dpi or so." and saved the "200dpi" in the file
- Later, we looked at the screen and measured that it's, in fact, 100dpi;
And, there is not only one screen the image could be shown on - they could be different in size, so it's not even possible to know a real dpi value when creating an image file.
See also my answer on What exactly is a "Pixel"? .
Directly to the question, based on the above:
When you specify dpi in an image file, that's not directly reated to the quality of the image show in the end.
But it may be used to communicate about image quality - in terms of intents: you can say "I want this image to be shown on a 200dpi screen".
If I want to show this image, I may take care and look to find a 200dpi screen; or maybe I just use an old 75dpi screen that may be on my desk. The image will be pretty large, I have to scroll - but that's my problem, and: you will not even find out what is really used - the 200dpi value did not controll the image quality - it just communicated how to display it "the right way" if I care.