Extra factorization for inner join(documentation issue)
#### Code Sample, a copy-pastable example if possible

```python
# Your code here

```
#### Problem description

Hi, 

I'm trying to understand the pandas source code for an **inner join** using pandas.merge. I've got a sense that the procedure is basically factorizing both the left keys and the right keys to values like [0,1,2,3...], and then join the table together based on the factorization result.

The point that I'm confused about is that the keys from the two tables are first factorized at this point https://github.com/pandas-dev/pandas/blob/28e0f18a30451601e8ac37b3ed75777bf1ed8f10/pandas/core/reshape/merge.py#L1274.  Then there is an optional factorization happening in this function: https://github.com/pandas-dev/pandas/blob/28e0f18a30451601e8ac37b3ed75777bf1ed8f10/pandas/core/reshape/merge.py#L1281. Also there is another mandatory factorization at this line: https://github.com/pandas-dev/pandas/blob/28e0f18a30451601e8ac37b3ed75777bf1ed8f10/pandas/core/reshape/merge.py#L1286.

After the first factorization, I could already transform the keys to sth like [0,1,2,3..], what is the point to factorize it again? There are comments mentioning that it's flatting the keys and making it dense. I'm not sure what it means and could you tell me an easy example that could use the later factorizations?

To clarify again, I'm only talking about the inner join case.

Thank you sincerely for your help!

#### Expected Output

#### Output of ``pd.show_versions()``
