If you define event $B$ simply as 'there is a goat behind door 3', then of course $P(A|B)=\frac{1}{2}$, for there are two options left for the car. And your use of Bayes' theorem to show $P(A|B)=\frac{1}{2}$ is also correct, for indeed with the $B$ defined this way, you have $P(A)=\frac{1}{3}$, $P(B)=\frac{2}{3}$, and $P(B|A)=1$
Put differently: asking what the chance is that door 1 has a car given that door 3 has a goat is effectively ignoring the whole 'game play' behind this problem. That is, you are not taking into account that Monty is revealing a door as a result of your choice, and whatever other assumptions are in force (such as: Monty knows where the prize is; Monty is certain to open a door with a goat; if you initially pick a door with the car, Monty will randomly pick one of the remaining two). Instead, event $B$ simply says: "there is a goat behind door $3$'. Indeed, as such, the problem statement might as well be:
Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. Oh, and another thing: door $3$ contains a goat. You pick door $1$. Is it to your advantage to switch your choice?
OK, what we need to do is take into account Monty's actions: it is indeed Monty's-act-of-picking-and-revealing-door-$3$-to-have-a-goat that is all important here.
So, instead, define $B$ as: "Monty Hall shows door $3$ to have a goat"
Notice how this is crucially different: for example, if door $1$ has the car, then door $3$ is certain to have a goat, but Monty is not certain to open door $3$ and reveal that: he might also open door $2$.
Now, let's use the standard assumptions that Monty is always sure to reveal a door with a goat and that, if both remaining doors have a goat, Monty chooses randomly between them to open.
OK, now $P(A)$ is still $\frac{1}{3}$, but otherwise things change radically with this new definition of $B$:
First, $P(B|A)$: Well, as pointed out above, this is no longer $1$, but becomes $\frac{1}{2}$, since Monty randomly chooses between doors 2 and 3 to open up.
Next, $P(B)$: what is the probability Monty opens door 3 to reveal a goat? There are two cases to consider in which Monty opens door 3: door 1 has the car, or door 2 has the car, each having a probability of $\frac{1}{3}$ Now, if door 1 has the car then, as we saw, there is a probability of $\frac{1}{2}$ of Monty revealing door 3 to have a goat. If door 2 has the car, then Monty is certain to reveal door 3 to have a goat. So: $P(B)=\frac{1}{3}\cdot \frac{1}{2}+\frac{1}{3}\cdot 1 = \frac{1}{2}$
Plugging this into Bayes' rule:
$$P(A|B)=\frac{P(B|A)\cdot P(A)}{P(B)}=\frac{\frac{1}{2}\cdot \frac{1}{3}}{\frac{1}{2}}=\frac{1}{3}$$
I believe the difference between these two $B$'s is actually at the heart of the Monty Hall Paradox. Most people will treat Monty opening door 3 and revealing a goat simply as the information that "door 3 has a goat" (i.e. as your initial $B$), in which case switching makes no difference, whereas using the information that "Monty Hall opens door 3 and reveals a goat" (i.e. as the newly defined $B$), switching does turn out to make a difference (again, within the context of the Standard Assumptions regarding this puzzle). And this is hard to grasp.
$$P(C=1|PD=3)=\frac{P(PD=3|C=1)P(C=1)}{P(PD=3)}=\frac c {1+c}\in[0,\frac 1 2]$$
You get the classical $\frac 1 3$ if $c=\frac 1 2$. Unless $c=1$ always, it makes sense to switch.
– A.S. Jan 04 '16 at 19:23