Why effect size magnitude is correlated with p value and confidence interval width in resampling statistics? I use effect size (e.g. mean difference) to compare two groups. I do randomization test to calculate the P-value and bootstrapping to find the percentile confidence interval.
I notice that at a fixed sample size, when the mean difference is larger (by simulation), the P-value and the width of confidence interval tend to be smaller.
### P-val
set.seed(1)
m <- vector()
p <- vector()
for(i in 1:30) {
  A <- rnorm(20, 0, 1)
  B <- rnorm(20, 0.1*i, 1)
  m[i] <- mean(B)-mean(A)
  pool <- c(A, B)
  result <- vector()
  for(j in 1:1000){
    a <- sample(pool, 20)
    b <- setdiff(pool, a)
    result[j] <- mean(b)-mean(a) 
  }
  p[i] <- sum(abs(result) >= abs(m[i]))/1000
}
plot(m,p)


### CI width for mean difference
set.seed(1)
m <- vector()
w <- vector()
for(i in 1:30) {
  A <- rnorm(20, 0, 1)
  B <- rnorm(20, 0.1*i, 1)
  m[i] <- mean(B)-mean(A)
  result <- vector()
  for(j in 1:1000){
    a <- sample(A, replace = TRUE)
    b <- sample(B, replace = TRUE)
    result[j] <- mean(b)-mean(a) 
  }
  ci.lower <- quantile(result, 0.05 / 2)
  ci.upper <- quantile(result, 1 - 0.05 / 2)
  w[i] <- ci.upper - ci.lower
}
plot(m,w)


### CI width for Vargha-Delaney A
library(RProbSup)
set.seed(1)
m <- vector()
w <- vector()
for(i in 1:30) {
  A <- rnorm(20, 0, 1)
  B <- rnorm(20, 0.1*i, 1)
  m[i] <- RProbSup::CalcA1(B, A)
  result <- vector()
  for(j in 1:1000){
    a <- sample(A, replace = TRUE)
    b <- sample(B, replace = TRUE)
    result[j] <- RProbSup::CalcA1(b, a)
  }
  ci.lower <- quantile(result, 0.05 / 2)
  ci.upper <- quantile(result, 1 - 0.05 / 2)
  w[i] <- ci.upper - ci.lower
}
plot(m,w)


How can we explain that? Does this mean the statistical uncertainty is already implied by the effect size magnitude itself?
Update: I was wrong about the width of CI in the case of mean difference as the effect size. The narrower CI width happens in the case of stochastic superiority effect size such as Vargha-Delaney A with fixed range (0,1). I imagine that the bootstrap distribution was "forced" to not expand over that limit and it should be narrower.

What you have done is simulation, not resampling. Anyhow, there is nothing surprising in your plot! m is the effect size (estimated mean difference), and when this grows larger, the testing problem gets easier, that is, you have higher power, and with higher power, you expect (at least you should expect) a smaller p-value. See Does a lower pvalue mean that test has higher power?   and   What is the impact of doubling a sample size on a p-value.
What you say about width of confidence intervals is not supported by anything in your simulation code or output!
