Birthday Problem. This is the famous 'birthday problem' or, because some people find the
answer surprising 'birthday paradox'. There are lots of links to it on
this site and elsewhere on the Internet, so I will get right to the point, and just
try to answer your specific question.
Often when sampling is 'with replacement' it is more convenient to
look at ordered outcomes. The birthday problem clearly involves sampling with
replacement because it is possible for a birthday to be selected more
than once.
There are many problems that can be answered with either ordered or
unordered samples. The important thing is that if you are using
ordered samples in the denominator (to count outcomes in the whole
sample space), you must also use ordered samples in the the numerator
(to count 'favorable' outcomes). In the birthday problem it
is especially easy to use a sample space with $365^n$ ordered samples in the denominator,
so it is natural to start with that and, accordingly, to use ordered
samples in the numerator.
Urn Problem. Here is a problem in which you can use either ordered or unordered
outcomes: I have an urn containing 5 balls, 3 red and 2 green. I withdraw
two balls without replacement. What is the probability I get two balls
of the same color:
Ordered (permutations).
Count all ordered outcomes in denominator: $5(4) = 20.$
Numerator. Ways with two red: $3(2) = 6.$ Ways with two green: 2(1) = 2.
Answer. $(6+2)/20 = 2/5$
Unordered (combinations).
Denominator: ${5 \choose 2} = 10.$
Numerator: Both red: ${3 \choose 2}{2 \choose 0} = 3.$
Both green: ${2 \choose 2}{3 \choose 0} = 1.$
Answer: $(3 + 1)/10 = 2/5.$
However, suppose my task to find the probability that I choose a red ball
and then a green ball. This new problem involves order, and I have no choice
but to use ordered outcomes throughout: $6/20 = 3/10.$
It is of course unrealistic that the chance of a person born on a Friday is $\frac{1}{3}$, but so be it. We are also told that for all other days of the week the chance is the same, so that would be
$$\frac{1-\frac{1}{3}}{6}=\frac{1}{9}$$ (e.g. the chance of being born on a Wednesday is $\frac{1}{9}$)
Now, there are various ways to have 2 people being born on the same day, and the other two on 2 other days:
$A$. Two born on a Friday, and the other two on two different days other than Friday
$B$. Two born on the same day but other than a Friday, one born on Friday, and the last on a different day yet.
$C$. Two born on the same day but other than a Friday, and the other two on two different days other than Friday
$$P(A) = {4 \choose 2} \cdot \big( \frac{1}{3} \big)^2\cdot \frac{6}{9} \cdot \frac{5}{9} = \frac{180}{729}$$
(the $4 \choose 2$ is the number of ways to pick the two people born on a Friday)
$$P(B) = {4 \choose 2} \cdot 6 \cdot \big( \frac{1}{9} \big)^2\cdot 2 \cdot \frac{1}{3} \cdot \frac{5}{9} = \frac{120}{729}$$
(the extra $2$ term is to distinguish the two people: one born on Friday, the other not. The $6$ is to pick one of the 6 days that the first two are born on)
$$P(C) = {4 \choose 2} \cdot 6 \cdot \big( \frac{1}{9} \big)^2 \cdot \frac{5}{9} \cdot \frac{4}{9} = \frac{80}{729}$$
Hence, the chance that 2 people being born on the same day, and the other two on 2 other days is:
$$P(A)+P(B)+P(C)=\frac{380}{729} \approx 0.52$$
Best Answer
When you have an event $E$ in a sample space $S$, the formula $P(E)=|E|/|S|$ only works when all the outcomes in $S$ are equally likely. When you forgot about order in the birthday problem, your sample space consisted of all multisets of $n$ birthdays. These are not all equally likely; the probability of two people being born on Jan 1 is $(1/365)^2$, but the probability of two people having the set of birthdays equal to $\{\text{Jan 1 , Jan 2}\}$ is $2(1/365)^2$, since there are two ways it can happen. This is why your formula fails.
The trick of forgetting the order often works in probability, but not here.
Side note: If you were to assert that all multisets of birthdays are equally likely, it would imply that the birthdays of the people are dependent in the following way. You can imagine the birthdays being chosen one at a time, where if there are already $n_i$ people whose birthday is the $i^{th}$ day of the year, the probability the next person is born on day $i$ is $$ \frac{n_i+1}{\sum_{i=1}^{365}(n_i+1)} $$ For example, the first person is equally likely to be born on any day, but then the second person has a $2/366$ chance of being born on the same day as the first person, and a $1/366$ chance of being born on any other day.