Binning continuous variables as you propose to do is generally not a good strategy. It's best to do an analysis as close as possible to the original data, in a way that gets most directly at the question you are trying to answer.
When you say you want "to study the relationship between subsection score and number of loci in the subsection," you imply that the score is an outcome variable of some type and numberOfLoci is a predictor variable that is characteristic of each subsection. That suggests regression of some type of score against numberOfLoci.
Start by plotting score against numberOfLoci for all subsections, along with a simple smoothed, non-parametric fit like a loess curve. That should quickly show the outline of the relationship.
For more detailed analysis, the type of regression depends on the nature of the score (outcome) variable--is it continuous, a count value, or a proportion? You could choose linear regression, Poisson (or other count) regression, or a binomial regression, respectively.
If there is more than a handful of distinct values of numberOfLoci among the subsections, then you can treat it as a continuous predictor but model it flexibly. Regression splines or generalized additive models are good ways to do this if you don't have any theoretical basis for the association between score and numberOfLoci.
One warning: from your last image, it looks like your score is some type of p-value. That type of score can be fraught with difficulty, as (1) it can be very dependent on the particular data sample at hand and (2) p-values are closely related to the number of cases evaluated. For example, if the score for a particular subsection is determined by the p-value of some test on the loci enumerated by numberOfLoci, then you will typically find lower score values when the numberOfLoci is higher. But that could just be due to the way that p-values are calculated and have no further biological significance.