Is your question about why "ever" is needed at all ?
That is, do you want to know how these two are different?
It is the most beautiful painting I have seen.
It is the most beautiful painting
I have ever seen.
These two mean the same thing.
However, the second is preferred for several reasons: "have seen" usually takes an indication of time ("have seen today", "have seen since Monday"...).
It sounds a little strange without it.
While "have seen" on its own suggests that "ever" is meant
, it's often preferable to actually say that clearly.
Saying "ever" also makes the statement more emphatic.
Given that the statement is praise for the painting, being emphatic is expected.
ell.stackexchange.com/users/6120/Tim Pederick
In your sentence example, ever is a superlative adverb and is linked to most , and as an adverb it could be placed either way 1)
I have ever seen 2)
I have seen ever 3)
I ever have seen where ever is defined by the totality of relevent experience, usually understood to be one's life time, but could also be
Queen Elizabeth is the longest reigning monarch ever in the UK.
Where is relevant experience is the history of the UK.
From my experience #1 is used most often .
#2 can be used for emphasis, where there is a slight pause before ever and then the ever is emphasized similar to really .
#3 is more poetic and literary in its cadence.
ell.stackexchange.com/users/26439/Peter
In that particular sentence and in many instances of practical uses of English Grammar, ever is used between have and seen :1.
To emphasize the degree of interest in an object2.
To indicate the totality of time before actually seeing that object.
To put simply, in one's lifetime3.
Used in affirmative sentences before superlatives to pass the sense 2 (above)
ell.stackexchange.com/users/28130/Shivam Srivastava
I would say that it gives the sentence a word that can be emphasized and possibly a better-sounding rhythm.
It also helps avoid some confusion.
I think I would dare to say that most of the time when no timeframe is mentioned the context is going to imply how far back to consider the comparison/superlative.
So depending on the setting it could implicitly meant something like these: "...
have seen [during our visit to the art gallery today.]
" or "...have seen [since I started working at this art gallery.]"
ell.stackexchange.com/users/8026/shawnt00
"ever" or "ever in my life" refers to the total time span of your life.
ell.stackexchange.com/users/4159/rogermue
As a mathematician, I would say that 'ever' is technically superfluous.
Heuristically , I think 'ever' is used for emphasis like when people say ' true fact '.
This is called a pleonasm as I just learned from here .
Probably the context might be that the previous sentences consisted of things like 'it is the most beautiful painting I have seen today' or 'it is the most beautiful painting I have seen in the museum'
ell.stackexchange.com/users/28158/BCLC
Depends on the implied time period
In your particular example, the word 'ever' may be left out because in this context, the implied time period of question actually is 'ever' and the meanings match.
However, contrast "Have you seen John?" and "Have you ever seen John?".
In this case (again, depending on the wider context) the answers may well be different - the first question can be used with a meaning closer to "Have you seen John today/
recently, I'm looking for him, where is he?"
and thus you may have a truthful answer of "No" even if you have seen him last week.
ell.stackexchange.com/users/4496/Peteris
I am reading  English Grammar in Use  by Raymond Murphy.  I have seen 2 sentences below,   It is a beautiful painting?   Yes, it is the most beautiful painting I have  ever  seen.   I dont know why did they use "ever" between  have  and  seen .  Please advise!
Why we need "ever" between "have" and "seen"
ell.stackexchange.com
<word-usage><word-meaning>
ell.stackexchange.com/questions/77060
ell.stackexchange.com/users/28126/English learner
"Ever" makes the statement more emphatic. Given that the statement is praise for the painting, being emphatic is expected. Ever' adds emphasis to the sentence.
Ever' adds emphasis to the sentence.