Hello,
the product of slopes of two perpendicular lines not parallel to x and y axes is -1 bcoz they make certain angles with the coordinate axes and for them theta is not equal to zero or 90 degree. but for x and y axes themselves or lines parallel to them , theta is equal to zero and 90 degree. therefore tan theta is equal to zero and infinty and hence the product of their slopes is not equal to one.