What Rudin is defining is usually called Borel measurability. If the range has a topology $\tau$, then it's natural to consider the $\sigma$-algebra $\sigma(\tau)$ generated by the topology, called the Borel $\sigma$-algebra.
General definition for measurability for maps between measurable spaces is as you said.
Notice that to check Borel-measurability, it is sufficient to check the generators $\tau$ by minimality of $\sigma(\tau)$.
The point of working with the Borel $\sigma$-algebra is to have compatibility between the two structures on your set. One example of a result displaying the link between $\tau$ and $\sigma(\tau)$ is the Riesz representation theorem:
Theorem Let $(X, \tau)$ be compact Hausdorff, every positive linear functional is integration with respect to some positive regular measure $\mu$ on $\sigma(\tau)$.
A measure is regular if measures of a measurable set can be approximated by open sets from above and compact sets from below. Notice openness and compactness are topological properties. So the theorem says integration against measures compatible with the topology coincide with linear functionals on $C(X)$.