In calculus, why can we treat the dy and dx as if they are parts of fractions, multiplying both sides by dx in separable differential equations for instance.
Because they are fractions. Although the purists will probably object there is no reason why we can't regard dy and dx as meaning a 'very very small bit of x and y'.